Please reference attached file 'dummy late service report'. I am looking for the simplest, most elegant solution to the problem below.
I would like excel to lookup the value of column F of worksheet 'late service report', check that against the table in worksheet 'lookup table', and return a number value from that table into column I of 'later service report'.
I will then compare that value with value from column G (# of days open) to determine if that row is overdue, and if overdue, display the number of days it is overdue.
Thanks in advance for your help.
Last edited by Chevy Nick; 01-09-2012 at 06:21 PM.
In I4:
=VLOOKUP(F4,'Lookup table'!$B$3:$D$12,3,FALSE)
in J4:
=MAX(0,G4-I4)
Note: You can use Vlookup in H4 also:
=VLOOKUP(F4,'Lookup table'!$B$3:$D$12,2,FALSE)
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
Thanks for your help. In case anyone ever looks at this, I notice I got better results with vlookup if my "lookup table" was arranged in alphabetic order.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks