Formulas on VBA

amattey

New Member
Joined
Jul 18, 2011
Messages
46
I have 3 columns in one sheet, The first one is a date formated (mm,dd,yyyy), the second one is an output column, and the third one is the input. I wanted to create a formula that will select whatever is in the third column as the input and if column 1 is 1 year less or 2 years after a date that is located in another ceel (different sheet), to say something like "Do this year". Could you advise in how to get started, I wrote something but even I looking at it does not make much sense.
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
This doesn't entirely make sense, but that should be ok - I just dont get what you are doing with Column C, your "input", and I'm also unsure what your date requirement is: 1 year before or 2 years after another date, is that right?

I guess you want to try something like

=if(OR(A1<[other date]-365,A1>[other date]+730),"perform action " & c1 & " this year","no action required")
 
Upvote 0

Forum statistics

Threads
1,224,504
Messages
6,179,142
Members
452,892
Latest member
JUSTOUTOFMYREACH

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