Hi
Hans kindly showed me how to create a lookup table, I am trying to re-create it in the attached workbook rows 5,6,7 work then I get a #ref error.
Many Thanks
Braddy
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
Home » Forums » AskWoody support » Productivity software by function » MS Excel and spreadsheet help » Lookup Table / (Excel 2003)
In G5 to G7, VLOOKUP(A6,status,2,0) evaluates to “distr” which is the name of a defined range (see Insert | Name | Define). Hence INDIRECT(VLOOKUP(A6,status,2,0)) results in a reference to the “distr” range.
In G8, however, VLOOKUP(A6,status,2,0) evaluates to “Dump Acc” which is NOT the name of a defined range. Hence INDIRECT(VLOOKUP(A6,status,2,0)) results in a #REF error.
I don’t understand what you want to accomplish with this formula. so I cannot suggest an improvement.
Hi Hans
What I am trying to achieve is the following.
If Mkt Sector = 275 or 265 or 17Y, or 56 then Status should = Distr, If Key Account3 = 17675, or another 13 numbers then status should = Dump Acc, If QS>0 and NIV = 0 then Status should = Free/NSI, else Keep.
I hope you can understand this
Thanks
Braddy
Hi Hans
I will try to explain the precedence.
IF(C5=275,”Distr”,IF(C5=265,”Distr”,IF(C5=”17Y”,”Distr”,IF(C5=56,”Distr”,IF(and(G5>0 H5=0,”Free/NSI”,”Keep”))))))
Keep is if none of the IF’s apply
I have left out the Key Account3 because there are to many Variables
Sorry to try your patience
Many Thanks
Braddy
An easier one to maintain, mibht be to use a Match for the first and second.
something like:
=IF(isnumber(Match(A2,,0)),”Dump Acc”,IF(OR(D2=275,D2=265,D2=”17Y”,D2=56),”Distr”,IF(AND(G2>0,H2>0),”Free/NSI”,”Keep”)))
or even:
=IF(isnumber(Match(A2,,0)),”Dump Acc”,IF(isnumber(match(d2,,0)),”Distr”,IF(AND(G2>0,H2>0),”Free/NSI”,”Keep”)))
The names in brackets could be names or ranges as desired for looking up. They could be dynamic ranges that grow as more items are added…
Steve
> The names in brackets could be names or ranges as desired for looking up. They could be dynamic ranges that grow as more items are added…
Since he is on Excel 2003, he can better convert the lookup tables into lists with Data|List|Create List, which makes defining ranges by means of dynamic formulas superfluous.
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.