PC Review


Reply
Thread Tools Rate Thread

best way to..?

 
 
PBcorn
Guest
Posts: n/a
 
      27th Oct 2008
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.
 
Reply With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      27th Oct 2008
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)




"PBcorn" wrote:

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

 
Reply With Quote
 
PBcorn
Guest
Posts: n/a
 
      27th Oct 2008
Thanks but i was looking for a macro solution as i need to insert two new
rows showing the sums.

"Joel" wrote:

> 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)
>
>
>
>
> "PBcorn" wrote:
>
> > 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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:00 AM.