Update cell value based on outcome of search function & if statement

srosk

Board Regular
Joined
Sep 17, 2018
Messages
132
I have a list of values in column C. There is a list of 10 values, where if present, I would like the value in column I to be updated to "_". But, I only want any of this to occur if today's date is before 1/1/2022.

I know I can use the search function to see if the value exists, but how exactly would I queue the macro to clear the values?

Code:
=SEARCH("1528",C2)

Thank you kindly!
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
This formula should work: =IF(TODAY()<SEARCH("1528",C2),"_","")

I have a list of values in column C. There is a list of 10 values, where if present, I would like the value in column I to be updated to "_". But, I only want any of this to occur if today's date is before 1/1/2022.

I know I can use the search function to see if the value exists, but how exactly would I queue the macro to clear the values?

Code:
=SEARCH("1528",C2)

Thank you kindly!
 
Upvote 0

Forum statistics

Threads
1,214,924
Messages
6,122,294
Members
449,077
Latest member
Rkmenon

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