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? :)
 
Upvote 0

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,215,330
Messages
6,124,310
Members
449,152
Latest member
PressEscape

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