View Single Post
  #6   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi

Let's the first table be on Sheet1 with headers in row 1, and second table
on Sheet2, also with headers on row 1 (both tables staring from column A).

As first step, modify either entries in Date column on Sheet1, or headers on
Sheet2, so date text are identical. I.e. or you have dates in form "Jan05"
etc., or your headers are like "GasDec 04".

Now, into cell B2 on Sheet2 enter the formula
=SUMPRODUCT(--(Sheet1!$A$2:$A$5=$A2),--(Sheet1!$B$2:$B$5=SUBSTITUTE(SUBSTITU
TE(B$1,"Gas",""),"Electric","")),--(Sheet1!$C$2:$C$5=SUBSTITUTE(B$1,SUBSTITU
TE(SUBSTITUTE(B$1,"Gas",""),"Electric",""),"")),Sh eet1!$D$2:$D$5)

and copy the formula into range B2:E3

--
When sending mail, use address arvil<attarkon.ee
Arvi Laanemets


"Natalie" wrote in message
...
Hi,

I have one worksheet with information for lots of people, but on separate
rows -

Name Date Type of Bill Cost
Joe Bloggs Jan 05 Gas £10
Joe Bloggs Dec 05 Electric £6
Jemma Jan 05 Gas £2
Jemma Jan 05 Electric £5

I want to add them to a new sheet, which is set out as:

Name GasDec04 GasJan05 ElectricDec04 ElectricJan05
Joe Bloggs 0 £10 £6 0
Jemma 0 £2 0

£5

Can I use a lookup to do this?

Thanks