#1   Report Post  
Posted to microsoft.public.excel.misc
blasds78
 
Posts: n/a
Default using vlookup

Ron,

Thanks again! I never would have figured that one out. I've not heard of
ISNA before.

Thanks also for the Data Validation suggestion. I have that in place in
other areas of the spreadsheet, and it would do weel in this use, too.

You've been a huge help! Have a good weekend!

Thanks,
Doug

"Ron Coderre" wrote:

First, a technical point: a formula will NEVER leave a cell blank. "Blank"
means contains nothing. A formula is not nothing.

Second...continuing with my posted example:

Try this standard approach to avoiding displayed errors:
B1: =IF(ISNA(VLOOKUP(A1,LU_TaxID,2,0)),"",VLOOKUP(A1,L U_TaxID,2,0))

That formula makes the cell appear blank.

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"blasds78" wrote:

Thanks, Ron! That helped.

I have one last thing I'd like to change. If I input nothing into a cell,
how do I get rid of the "#N/A" and just have a blank cell?

Thanks,
Doug

"Ron Coderre" wrote:

Yes, it seems like VLOOKUP will do what you want.

Try this:

On a separate sheet, create a 2-column list of state abbreviations and TaxIDs
Since it's good practice to use range names in these situations:
select the 2-col list
<Insert<Name<Define
Names in workbook: LU_TaxID
Refers to: (your already selected list range)
Click the [OK] button

Next, on your input sheet...
Assuming you input a State Abbreviation in A1
B1: =VLOOKUP(A1,LU_TaxID,2,0)

That formula will search the first column of the LU_TaxID range for the
state abbreviation in A1 and return the corresponding TaxID.

One other tip. You might want to consider using Data Validation for the
State Abbreviations to ensure that only valid abbreviations are used.
See Debra Dalgleish's Contextures website for instructions:

http://www.contextures.com/xlDataVal01.html

Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"blasds78" wrote:

I'm a novice at this function.

We send money to the department of revenue for each state. Each state has
an assigned "account" number. My spreadsheet has a column in which a state
abbreviation should be typed. If I enter the state abbreviation "MO", I
would like to have the corresponding "account" number appear in the adjacent
cell.

Is this the best function to use? And, if so, how do I get it to work? I
keep getting error messages with this.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLOOKUP Problem Ian Excel Discussion (Misc queries) 3 April 6th 06 06:47 PM
Using single cell reference as table array argument in Vlookup CornNiblet Excel Worksheet Functions 3 September 22nd 05 09:15 AM
VLOOKUP Limitations chris_manning Excel Worksheet Functions 2 August 9th 05 06:23 PM
Have Vlookup return a Value of 0 instead of #N/A Mr Mike Excel Worksheet Functions 4 May 25th 05 04:51 PM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 12:09 PM


All times are GMT +1. The time now is 04:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"