If critera is met, skip rows

skaffapingvin

New Member
Joined
Apr 12, 2013
Messages
49
Hello,

I wonder if this is possible?

I want to have a formula in column B, range B4:B1500.
Column C, range C4:C1500 contains random text or could be empty.
But if a cell in column C contains the word "PASSPORT" I want the cell in col B, 2 rows down to show todays date.

Example:
If C10="PASSPORT", then B12=Today(), IF false,""
How would this kind of formula look like?
:)
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
You would put this formula in cell B12:
Excel Formula:
=IF(C10="PASSPORT",TODAY(),"")

Just note that TODAY() will ALWAYS return the current date.
So tomorrow, any cell meeting that condition will show tomorrow's date, etc.

If you want to capture the current date, and hard-code it in the cell (like a Date Stamp), you would typically use VBA for something like that.
There are literally thousands of threads on this forum that deal with Date Stamps (the question is asked quite often).
 
Upvote 0
Hi,

Thanks for replying. Actually it doesn't have to be todays date that is shown in col B, it can be any date such as 23-07-28 as an example.
So date stamp is not needed for this example.

=IF(C10="PASSPORT","23-07-28",""), would this be correct?
 
Upvote 0
What I am telling you is that the TODAY() function is dynamic, it will ALWAYS return the current date.

So if you had the formula:
Excel Formula:
=IF(C10="PASSPORT",TODAY(),"")
in cell B12, and C10 is equal to "PASSPORT", then cell B12 will return today's date.

If you save the file, and open it up again tomorrow, cell B12 will then show tomorrow's date (as it will always dynamically return the current date).

If that works for you, there is no issue.
If you are trying to capture the date that "PASSPORT" was entered into cell C10, and "freeze" that date so it doesn't change, then a formula approach will not work for you.
 
Upvote 0
=IF(C10="PASSPORT","23-07-28",""), would this be correct?
That will probably return a Text entry of "23-07-28", not a date value.

You can use this formula:
Excel Formula:
=IF(C10="PASSPORT",DATE(2023,7,28),"")
and apply a custom format on the cell of "yy-dd-mm".
 
Upvote 1
Solution
You are welcome.
Glad I was able to help.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,334
Members
452,636
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top