View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default If, vlookup, data validation & dependent list

Surely TRIM is better in a 'simplified' version?

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Teethless mama" wrote in message
...
Simplify version:

=VLOOKUP(IF(OR(A3={""," "}),A2,A3),Sheet1!$A$2:$B$141,2,0)


"Karen" wrote:

I have a data validation selection in A2 and a dependent list in A3.
There
are instances where there's no dependent list after making a selection in
A2;
so there's no entry made in A3.

I want to a formula in A4. The formula will say if A3 is not blank,
vlookup
A3 in a lookup table. However, if A3 is blank, vlookup A2 in the same
lookup
table. My formula currently reads like this: =IF(A3<"
",VLOOKUP(A3,Sheet1!$A$2:$B$141,2,FALSE),VLOOKUP(A 2,Sheet1!$A$2:$B$141,2,FALSE)).

The trouble is when A3 is blank I get a #N/A result even though I know
that
A2 is in the table. Please advise as to how to modify this formula to
get
the correct result. All help is prematurely appreciated.
--
Thanks, Karen



 
ExcelBanter Database Error
Database Error Database error
The ExcelBanter database has encountered a problem.

Please try the following:
  • Load the page again by clicking the Refresh button in your web browser.
  • Open the www.excelbanter.com home page, then try to open another page.
  • Click the Back button to try another link.
The www.excelbanter.com forum technical staff have been notified of the error, though you may contact them if the problem persists.
 
We apologise for any inconvenience.