View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default IF & VLOOKUP Together

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"TexJen" wrote in message
...
Nevermind the e-mail I just sent you about needing the 'difference'.
Not sure what I did the first time but I just went in and put "G2-" before
the last VLOOKUP part and it's PERFECT.
It returns the overage value.

THANK YOU AGAIN for your assistance. It was brilliant!



"T. Valko" wrote:

Try this:

=IF(VLOOKUP(A2,Sheet2!A$2:B$7,2,0)G2,0,VLOOKUP(A2 ,Sheet2!A$2:B$7,2,0))

--
Biff
Microsoft Excel MVP


"TexJen" wrote in message
...
Thanks in advance for any assistance!

Worksheet 1 has:
Column A = Positions
There are 6 levels, ie: P1, P4, T9,...

Column G = Expenses, in $.

Worksheet 2 has:
A table listing the positions (same as Column A in 1st worksheet).
Also contains 'Max Spending Level' in $, in Column B.

How can I use IF & VLOOKUP nested together to:
Have it look at the Position in Column A in worksheet 1, then look at
the
Expenses in Column G (worksheet 1) and see if those expenses are over
the
'Max Spending Level' on the Table in the 2nd worksheet (column B),
depending
on the Position in Column A in that same table?

Or, otherwise stated:
I need Worksheet 1 to reference Worksheet 2's table.
I need it to return a value of 0 if it is not over the Max Spending
Level,
but if it is over, then I need it to return that value.

If I've been too verbose and not clear, please let me know. I will try
anything.
Thanks much!
- TexJen