Possible to grab Max Value across columns?

sstincone

New member
Local time
Today, 11:28
Joined
Jan 14, 2009
Messages
2
Hi, I have a db where there are 4 columns. The first column is the account number and the 3 other columns have numeric values. I would like to know if its possible to see which column has the max value?

e.g

Account Abs 1 Abs 3 Abs 4
123456 17 25 40

Is their a way it can return 40 for me? I want to be able to find the max value.

Thank you in advance.
 
You might want to take the time now to re-examine the normalization of your table as well. Just a gentle nudge. ;)
 
I actually agree. I was able to do it in Excel with no problems but my mgr is insisting to have it done Access since it will be done every month. He claims there is a way by writing an if statement. I'll have him show me and if it works. I'll post it.

Thanks a
 
I certainly agree that it's not a good design. You'll be a lot happier in the long run if you normalize the data. That said, it can be done with IIf() functions embedded in one another, but it would be a lot messier than the above function.
 
IIf([A]>,IIf([A]>[C],[A]),IIf(>[C],IIf(>[A],),IIf([C]>,IIf([C]>[A],[C]))))

this will work
Thanks
kapil
 
Hi kapil0712:

If it will be 5 columns what would be the iif formula?

And need to know the minimum value for these 5 columns



Thanks in advance.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom