Solved

if statement with vlookup

Posted on 2014-07-31
3
158 Views
Last Modified: 2014-07-31
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
Comment
Question by:spudmcc
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 27

Accepted Solution

by:
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

by:spudmcc
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

by:Glenn Ray
ID: 40233381
I'm glad I could help.
-Glenn
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

726 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