Formula For reading a Value and then changing a date

thebigbadbull55

New Member
Joined
Sep 11, 2018
Messages
7
I am looking to create a formula to read a Y/N value in a spreadsheet and if Y, do nothing. If N, I need to update a date in the data.

EmployeeStartEndAvailable?
Jim2019-01-012019-01-02Y
Bill2019-01-012019-01-02Y
Tiffany2019-01-012019-01-02N
Jen2019-01-022019-01-03N

<tbody>
</tbody>


So looking at the table, I need a formula that will read the available column and change a date. So if the available column reads Y, the formula should do nothing. If the available column reads N, I need to update the Start and End date to a date in the future (could simply be 2099-12-31) - don't want the system to pick up the date.

I have struck out trying to get anything working and it is driving me crazy. Not sure if it will use a different formula like SWITCH within an IF formula?

Any help would be much appreciated!!!

thank you!!
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
what drives your logic for the future date?
 
Upvote 0
This dataset is being utilized in third party software. I am trying to put the date far in the future so that the system won't read the entry.
 
Upvote 0
so how often will you run the code and how far in the future ?
 
Upvote 0
still need to know how far you would push it
 
Upvote 0
very loosley

Code:
Dim N as long
    For N = 1 To 100
    'Target review column S
    'U is your date value
   If Range("S" & N) = "N" Then Range("U" & N) = Range("U" & N)+100
   next n

untested
 
Upvote 0

Forum statistics

Threads
1,216,571
Messages
6,131,481
Members
449,653
Latest member
aurelius33

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