ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Vlookup Calculations (https://www.excelbanter.com/excel-worksheet-functions/165711-vlookup-calculations.html)

RBG

Vlookup Calculations
 
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.



John Bundy

Vlookup Calculations
 
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.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"RBG" wrote:

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.



RBG

Vlookup Calculations
 
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


"John Bundy" wrote:

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.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"RBG" wrote:

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.



Mike H

Vlookup Calculations
 
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

"RBG" wrote:

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


"John Bundy" wrote:

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.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"RBG" wrote:

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.




All times are GMT +1. The time now is 07:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com