View Single Post
  #2  
Old June 4th, 2010, 04:22 PM posted to microsoft.public.excel.misc
Jackpot
external usenet poster
 
Posts: 28
Default Vlookup and Hlookup help

Try the below.Change the text strings to cell references...

=SUMIF(A:A,"ProductA",OFFSET(A:A,,MATCH("Company A",A1:J1,0)-1))

OR

=SUMIF(A:A,"ProductA",OFFSET(B:B,,MATCH("Company A",A1:J1,0)-2))


"Nikki" wrote:

I have a situation where I need to lookup Product A but then lookup Company A
in a column that changes.

vlookup("Product A",A1:T25,hlookup("Company A",A1:T25,0)) but can't seem to
get this to work.

The vlookup area has Product A listed 5 times but Company A (horizontally is
only listed 1 time). I hope this makes sense but I can't seem to get it to
work.

Example - my total for Product A and Company A should be $500

Company A Company B Company C
Product A 0 100 0
Product A 0 100 0
Product A 0 100 0
Product A 100 100 0
Product A 100 100 100