Excel Problem
Moderator: Thanas
- MKSheppard
- Ruthless Genocidal Warmonger
- Posts: 29842
- Joined: 2002-07-06 06:34pm
Excel Problem
So. I have a problem with Excel 2010. I am trying to do a VLOOKUP of stuff to assist me in my research at the National Archives.
As you can see, a lot of interesting things are in RG-306-PS-C
Now. There is a finding aid for what numbers go into what boxes, which I scanned in and OCRed.
Now if we take the top most one; photo ID 58-5134 "Three Stage SSTO by Goodyear"; if you check the box index, the correct box that holds 58-5134 is Box 12.
But VLOOKUP renders a totally wrong box; 20B.
This has me fucking tearing my hair out; since automating the lookup speeds up my research turnaround considerably; yet Excel is being fucking retarded.
As you can see, a lot of interesting things are in RG-306-PS-C
Now. There is a finding aid for what numbers go into what boxes, which I scanned in and OCRed.
Now if we take the top most one; photo ID 58-5134 "Three Stage SSTO by Goodyear"; if you check the box index, the correct box that holds 58-5134 is Box 12.
But VLOOKUP renders a totally wrong box; 20B.
This has me fucking tearing my hair out; since automating the lookup speeds up my research turnaround considerably; yet Excel is being fucking retarded.
"If scientists and inventors who develop disease cures and useful technologies don't get lifetime royalties, I'd like to know what fucking rationale you have for some guy getting lifetime royalties for writing an episode of Full House." - Mike Wong
"The present air situation in the Pacific is entirely the result of fighting a fifth rate air power." - U.S. Navy Memo - 24 July 1944
"The present air situation in the Pacific is entirely the result of fighting a fifth rate air power." - U.S. Navy Memo - 24 July 1944
- General Zod
- Never Shuts Up
- Posts: 29211
- Joined: 2003-11-18 03:08pm
- Location: The Clearance Rack
- Contact:
Re: Excel Problem
Set the range to False instead of True or Excel won't provide an exact match.
"It's you Americans. There's something about nipples you hate. If this were Germany, we'd be romping around naked on the stage here."
- MKSheppard
- Ruthless Genocidal Warmonger
- Posts: 29842
- Joined: 2002-07-06 06:34pm
Re: Excel Problem
Look at the first photo. It shows teh VLOOKUP.
But since you didn't notice:
=VLOOKUP(A2,Rows!A$2:B$87,TRUE)
But since you didn't notice:
=VLOOKUP(A2,Rows!A$2:B$87,TRUE)
"If scientists and inventors who develop disease cures and useful technologies don't get lifetime royalties, I'd like to know what fucking rationale you have for some guy getting lifetime royalties for writing an episode of Full House." - Mike Wong
"The present air situation in the Pacific is entirely the result of fighting a fifth rate air power." - U.S. Navy Memo - 24 July 1944
"The present air situation in the Pacific is entirely the result of fighting a fifth rate air power." - U.S. Navy Memo - 24 July 1944
- General Zod
- Never Shuts Up
- Posts: 29211
- Joined: 2003-11-18 03:08pm
- Location: The Clearance Rack
- Contact:
Re: Excel Problem
Read my edit. I noticed after the fact.MKSheppard wrote:Look at the first photo. It shows teh VLOOKUP.
But since you didn't notice:
=VLOOKUP(A2,Rows!A$2:B$87,TRUE)
"It's you Americans. There's something about nipples you hate. If this were Germany, we'd be romping around naked on the stage here."
- MKSheppard
- Ruthless Genocidal Warmonger
- Posts: 29842
- Joined: 2002-07-06 06:34pm
Re: Excel Problem
gives me #Value!
"If scientists and inventors who develop disease cures and useful technologies don't get lifetime royalties, I'd like to know what fucking rationale you have for some guy getting lifetime royalties for writing an episode of Full House." - Mike Wong
"The present air situation in the Pacific is entirely the result of fighting a fifth rate air power." - U.S. Navy Memo - 24 July 1944
"The present air situation in the Pacific is entirely the result of fighting a fifth rate air power." - U.S. Navy Memo - 24 July 1944
- General Zod
- Never Shuts Up
- Posts: 29211
- Joined: 2003-11-18 03:08pm
- Location: The Clearance Rack
- Contact:
Re: Excel Problem
Trim clean your entries. Then highlight your cells, right-click, format cells, and select text. If they're using some funky formatting or there's hidden spaces it won't match up either.MKSheppard wrote:gives me #Value!
"It's you Americans. There's something about nipples you hate. If this were Germany, we'd be romping around naked on the stage here."
- MKSheppard
- Ruthless Genocidal Warmonger
- Posts: 29842
- Joined: 2002-07-06 06:34pm
Re: Excel Problem
Done that. No spaces are in my entries. Still #VALUE!General Zod wrote:Trim clean your entries. Then highlight your cells, right-click, format cells, and select text. If they're using some funky formatting or there's hidden spaces it won't match up either.
"If scientists and inventors who develop disease cures and useful technologies don't get lifetime royalties, I'd like to know what fucking rationale you have for some guy getting lifetime royalties for writing an episode of Full House." - Mike Wong
"The present air situation in the Pacific is entirely the result of fighting a fifth rate air power." - U.S. Navy Memo - 24 July 1944
"The present air situation in the Pacific is entirely the result of fighting a fifth rate air power." - U.S. Navy Memo - 24 July 1944
- Terralthra
- Requiescat in Pace
- Posts: 4741
- Joined: 2007-10-05 09:55pm
- Location: San Francisco, California, United States
Re: Excel Problem
VLOOKUP will not work with ranges such as you have with TRUE set as Zod says, since none of your ID numbers (Column A) in the first table are exact matches to the columns in the second table (Column B or D). That needs to be set to FALSE so it will give you the last LESSTHAN response (default behavior, in other words).
It's giving you 20B for all entries you have because your photo IDs are in neither case actual numbers, and Excel's logic for matching strings of numeric data with non-equal lengths and dashes randomly inserted is screwy. In essence, to Excel, 58-1234 is < than 51-12345, where in your numbering system, it is presumably not. Thus, your rows are "out of order" to VLOOKUP and any result you get will be bogus.
No way to do this without sanitizing and normalizing your photo IDs to a consistent length/format.
It's giving you 20B for all entries you have because your photo IDs are in neither case actual numbers, and Excel's logic for matching strings of numeric data with non-equal lengths and dashes randomly inserted is screwy. In essence, to Excel, 58-1234 is < than 51-12345, where in your numbering system, it is presumably not. Thus, your rows are "out of order" to VLOOKUP and any result you get will be bogus.
No way to do this without sanitizing and normalizing your photo IDs to a consistent length/format.
Re: Excel Problem
You can do it. Use INDEX and MATCH together. MATCH is far more forgiving of these things than VLOOKUP.
=INDEX(Rows!$A$2:$A$87,MATCH(A2,Rows!$B$2:$B$87,-1),1)
At least I think that will work...
=INDEX(Rows!$A$2:$A$87,MATCH(A2,Rows!$B$2:$B$87,-1),1)
At least I think that will work...
I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals.
-Winston Churchhill
I think a part of my sanity has been lost throughout this whole experience. And some of my foreskin - My cheating work colleague at it again
-Winston Churchhill
I think a part of my sanity has been lost throughout this whole experience. And some of my foreskin - My cheating work colleague at it again