Max VBA Function??

robfo0

Active Member
Joined
Feb 19, 2002
Messages
281
Hi everyone,

I have 4 variables (dates in column B) in a worksheet. I am trying to find the most recent date out of the 4 and return the cell value to the left of it (value in column A).

Before, I only had 3 variables and was using a nested if-then-else, which was working pretty good, but now i have another variable, and a nested 4 variable if then else is a lot harder to handle than 3. I was wondering if there is another way to accomlish what I am trying to do.

Any help is greatly appreciated!

edit: I was previously doing this in VBA during a routine that is run. I would like to keep it in VBA so that I do not have to go back and edit files, which is where the data comes from (long story). So I would like to keep it in VBA if possible
This message was edited by robfo0 on 2002-08-26 17:15
 
Hi Juan,

I used the "With ActiveSheet" in the follow up posts because I just copied the routine from my first post and went from there. I am lazy, what can I say? :smile:
 
Upvote 0

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,223,627
Messages
6,173,424
Members
452,515
Latest member
Alicedonald9

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