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

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
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,215,594
Messages
6,125,723
Members
449,255
Latest member
whatdoido

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