best way to..?

P

PBcorn

i have a list of data with row labels like this:

a c
a x
a n
a y
b c
b x
b n
b y

just want to know the simplest way to add rows c,n for a and b, then delete
rows c and n for a and b, then insert two new rows containing c+n. Tried cut
and paste with xlAdd but this is messy. Also thought of using arrays, but
this could be more long winded while avoiding the problems i am having with
copy/paste.
 
J

Joel

A sumproduct formula usually will work


=sumproduct(--($A:$A="a"),--($B:$B="c"),$C:$C)+sumproduct(--($A:$A="a"),--($B:$B="n"),$C:$C)+sumproduct(--($A:$A="b"),--($B:$B="c"),$C:$C)+sumproduct(--($A:$A="b"),--($B:$B="b"),$C:$C)
 
P

PBcorn

Thanks but i was looking for a macro solution as i need to insert two new
rows showing the sums.
 

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

Top