View Single Post
  #3   Report Post  
Dave Breitenbach
 
Posts: n/a
Default

Inthestands,

Here is an alternative solution without adding columns(please note, some of
the labels were different between the months - bean vs. beans was skewing the
results so I made the change to beans for everyone-typos will cost you here):

I've placed these in columns A7 through G7 with the formula in G

formula in g8:
=IF(SUMPRODUCT(--($A$8:$A$28=D8),--($B$8:$B$28=E8),--($C$8:$C$28))=0,"new",F8-SUMPRODUCT(--($A$8:$A$28=D8),--($B$8:$B$28=E8),--($C$8:$C$28)))

....and then copy down. Only other comment: the ranges in each portion of
the sumproduct formula need to be consistent, so you need to use the highest
row number(28 here) for the 2 months you're comparing to make sure to include
all the data. It doesn't matter that there is no data in a28.


customer item Jan customer item Feb change in vendor price/new
Bill apple $1.00 Adam beans $2.55 new
Bill beans $2.00 Adam pear $4.30 new
Bill orange $3.50 Bill apple $1.20 $0.20
Bill peach $4.00 Bill bean $2.00 new
Randy apple $1.05 Bill orange $3.30 ($0.20)
Randy beans $2.40 George apple $1.25 new
Randy cherry $3.60 Randy apple $1.05 $0.00
Randy grape $0.80 Randy beans $2.35 ($0.05)
Randy orange $3.75 Randy grape $0.90 $0.10
Randy nuts $4.70 Randy orange $3.65 ($0.10)
Rick apple $1.00 Randy peach $4.50 new
Rick bean $2.60 Rick apple $0.95 ($0.05)
Rick peach $4.50 Rick beans $2.45 ($2.15)
Rick pear $4.20 Rick peach $4.50 $0.00
Rick beans $4.60 Rick pear $4.20 $0.00
Rick nuts $5.00 Rick peas $4.60 new
Tom apple $1.10 Rick nuts $5.00 $0.00
Tom cherry $3.40 Tom cherry $3.30 ($0.10)
Tom grape $1.10 Tom grape $0.90 ($0.20)
Tom pear $4.40 Tom pear $4.40 $0.00
Tom peas $4.60 new

hth,
Dave


Thanks in advance,
inthestands