Solved

Tricky vlookup with if formula

Posted on 2014-07-20
1
272 Views
Last Modified: 2014-07-20
Hi experts excel 2010

Hi experts excel 2010

How would you write a formula so if in column A cell 2 you have a data value and cell A3 is empty, so the formula copies the data entry from cell A2 and in cell A3 the lookup applies. Formula in cell b2. Etc...

So
Col A.          Col B.
Wcd.            Wcd.
                     Here blank look finds value from look up table
Adds.           Adds.

Etc...
0
Comment
Question by:route217
1 Comment
 
LVL 27

Accepted Solution

by:
Glenn Ray earned 500 total points
ID: 40208041
Assuming the formulas will be in column B, I think it would look something like this (in cell B2, copied down):
=IF(A2<>"",A2,IFERROR(VLOOKUP(A1, table_array, col_index_num, [range_lookup]),"")

This isn't really applicable on row 2, but when copied down the formula will check if there is a blank value in the adjacent cell.  If the cell isn't blank, then the formula returns the same value as the adjacent cell.  Otherwise (if blank) it does a VLOOKUP on the immediately preceeding value (one row above).

One problem with this is that it won't work if there are blank values in consecutive rows, like so:

A3: wcd.
A4:
A5:
A6: wcd.

B4 will do a lookup using "wcd.", but B5 will have nothing to lookup since A4 is blank.

-Glenn
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question