Solved

# if statement with vlookup

Posted on 2014-07-31
142 Views
Hi Experts

Have a challenge that I haven't been able to figure out.  My skill with functions is limited so your help would be appreciated.

I have a table with product (A), BASE (B) AND NET (C).  I have a lookup table with AREA (H) and PAD (I).
Each of the products start with a two character alpha that matches the items in the area column.

IF LEFT TWO CHARACTERS EQUAL "AREA" THEN MULTIPLY BASE X PAD

I've attached a simple spreadsheet that shows what I need.  I think I am experiencing brain fad because this should be simple.
EXAMPLE.xlsx
0
Question by:spudmcc
• 2

LVL 27

Accepted Solution

Glenn Ray earned 500 total points
ID: 40233182
Insert this formula in cell B2 and copy down:
=VLOOKUP(LEFT(A2,2),\$H\$2:\$I\$7,2,FALSE)*B2

The LEFT(A2,2) portion is picking up the leftmost two characters and then checking for that value in column H.

If you want some error handling:
=IFERROR(VLOOKUP(LEFT(A2,2),\$H\$2:\$I\$7,2,FALSE)*B2,0)

Regards,
-Glenn
0

Author Closing Comment

ID: 40233200
This was spot on!  Again, you have come to my aid and I so very much appreciate it.
Thank you so much for your time and talent.

Andy
0

LVL 27

Expert Comment

ID: 40233381
-Glenn
0

## Featured Post

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…