Vlookup Calculations

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Not sure if a Vlookup is the right function but this is my situation: On one
worksheet i have a row of column headers and on the second worksheet i have
the data. I want to compose a formula where I can lookup the column header
from the first worksheet on the second and then if found, take the difference
between two columns on the second spreadsheet.
 
If you are wanting to do a vlookup using headers and the data is on a set
row, you want to look into the Hlookup function, a lot like vlookup but works
horizontally.
 
Maybe an illustration would better explain what I am trying to: I am trying
to lookup an item from worksheet 1 on worksheet 2 and if found i want to
calculate the difference between gross and net without having to add an
additional column on worksheet 2 for the difference. Thanks

Worksheet 1
Computers Laptops Ipods


Worksheet 2
Item Gross Net
Computers 25 15
Laptops 10 5
Ipods 17 3
 
If as it seems you only have a single entry for computers etc in your second
sheet then this would work.

=SUMPRODUCT((Sheet3!A1:A10="Computers")*(Sheet3!B1:B10-Sheet3!C1:C10))

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top