Solved If field contains date then formula help!

October 11, 2017 at 14:59:19
Specs: Windows 10
Hi,

I'm trying to create an if formula and I'm a bit stuck.

Column L contains dates separated by commas. I'm trying to create a formula to say:

if L2 contains (fixed date from a single cell) then "Exclude" else "No"

There are two issues. How do I make the if statement contains not just equals? How do I copy the cells down and keep the field with date in fixed?

For example I added the date I needed to 'Delivery sheets d1':
=IF(Data!L2='Delivery sheets'!D1,"exclude","No") but when I try and fill down the D1 continues in a series e.g. d1, d2, d3 etc

I hope this makes sense. Thanks in advance!


See More: If field contains date then formula help!

Reply ↓  Report •

#1
October 11, 2017 at 16:02:16
✔ Best Answer
I think what you need is to anchor the D1 cell, so something like:

=IF(Data!L2='Delivery sheets'!$D$1,"exclude","No")

Note the Dollar Symbol, it is used to anchor both the Column & Row for what is called an Absolute Reference, while the Row & Column without them is termed a Relative Reference.
See here for more info:

https://www.howtogeek.com/school/mi...

Not completely sure what you mean by:
Column L contains dates separated by commas.

If you have two or more dates in one cell, separated by a comma
then you will need a much more robust formula to search within the cell
for a TEXT string that looks like a date.

MIKE

http://www.skeptic.com/


Reply ↓  Report •

#2
October 11, 2017 at 18:12:51
It might help if you posted an example of what is in Data!L2 and 'Delivery sheets'!D1.

How To Post Data or Code ---> Click Here Before Posting Data or VBA Code


Reply ↓  Report •
Related Solutions


Ask Question