Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VLOOKUP 1

Status
Not open for further replies.

CTaylor1968

Vendor
Aug 5, 2005
35
GB
I have a spreadsheet to record our team's expenditure. We have a number of cost centres with just 3 project codes. So, for example anything to do with training is under project code UKN8455, but anything to do with statutory requirements is UKN8450.
My spreadsheet records the cost centre and the project code and I used a VLOOKUP formula, so if Column L reads a specific cost centre, column N will then put in the description. This works fine. I then added a formula to column P to say that if column N reads "", then column P should put in the correct project code. This works each time BUT it doesn't work correctly. So each time column N says CCC&ACC, column P should put in UKN8450. But it's not - it's putting in UKN8455 for each and every item.
I have used the following formula (with the requisites being in columns AE,AF and AG.):-
=IF(N3="","",VLOOKUP($N$3,$AF$3:$AG$16,2))
I've tried adding FALSE at the end of the formula but to no avail.
Help anyone?

Thank you as always
 


Hi,
[tt]
=IF(N3="","",VLOOKUP(N3,$AE$3:$AG$16,2))
[/tt]
1) IF you are copying this expression down, then the first argument in the lookup must be relative -- you had it ABSOLUTE --
-->$N$3.

2) You had the second argument $AF$3:$AG$16, yet you stated, "with the requisites being in columns AE,AF and AG" -- so I changed the reference to $AE$3:$AG$16.

HOWEVER, the values in column AE (or AF as the case may be) must correspond to the lookup values in column N

Skip,

[glasses] [red]Sign above the facsimile apparatus at the music publisher:[/red]
If it ain't baroque...
Don't FAX it![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top