Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Kenny Kendrena via OfficeKB.com
 
Posts: n/a
Default copy / paste selective rows

Hi all,

I'm trying to copy a row of formulas and paste selectively (every 7th row)
the same formulas (keeping them relative to their row). FYI the 6 rows in
between consist of some #'s and some formulas. Thus, trying to use go to
special formulas doesn't do the trick. Is there a macro that lets me
copy and paste every x rows and loop until it reaches the end of my data?
Thanks!

--
Message posted via http://www.officekb.com
  #2   Report Post  
Max
 
Posts: n/a
Default

Perhaps something along these lines ..

Suppose you have in Sheet1

in C1: =SUM(A1:B1)
in C8: =SUM(A8:B8)
in C15: =SUM(A15:B15)
and so on

In Sheet2
--------
Put in C1:
=IF(MOD(ROWS($A$1:A1)-1,7)=0,SUM(A1:B1),"")
Copy C1 down to say, C15

In C1, C8, C15 will be the same relative formulas as in Sheet1

--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
Kenny Kendrena via OfficeKB.com wrote in message
...
Hi all,

I'm trying to copy a row of formulas and paste selectively (every 7th row)
the same formulas (keeping them relative to their row). FYI the 6 rows in
between consist of some #'s and some formulas. Thus, trying to use go to

special formulas doesn't do the trick. Is there a macro that lets me
copy and paste every x rows and loop until it reaches the end of my data?
Thanks!

--
Message posted via http://www.officekb.com



  #3   Report Post  
Kenny Kendrena via OfficeKB.com
 
Posts: n/a
Default

Thank you, Max. I'm still having trouble, though.
What I have is data in d4:d6, and I want d7 to AVERAGE the #'s above. Then
I have header rows for each new person a couple blank lines and then the
same pattern of data/formulas all the way down (for instance, data in
d13:d15 that I want the average of in d16, and so forth).

Player Year Team W L

Abbott 04 KAN 3 5
03 KAN 1 2
02 SEA 1 3
avg. D7 E7



Player Year Team W L

Acevedo 04 CIN 5 3
03 CIN 2 0
02 CIN 4 2
avg. D16 E16

See what I mean?

--
Message posted via http://www.officekb.com
  #4   Report Post  
Max
 
Posts: n/a
Default

Assuming your data as posted is in Sheet1, starting from D4 down,
with the averages required in D7, D16, D25, etc
(i.e. every 9 cells from D7 onwards, average the 3 cells above)
and with corresponding averages across in col E, F, etc

In Sheet2
-----------
Put in D4:

=IF(MOD(ROWS($A$1:A1)-1,9)=3,AVERAGE(Sheet1!D1:D3),IF(Sheet1!D4="","",Sh eet1
!D4))

Copy D4 down and fill across as required
Example: copy down to D25, fill across to F25

The above will return what's in Sheet1's D4:F25,
but with the averages evaluated in:
D7:F7, D16:F16, D25:F25

Then, if desired, just select D4:F25
and do a copy paste special values
over D4:F25 in Sheet1 to overwrite
(but try this on a *spare copy* first)

Adapt to suit
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
"Kenny Kendrena via OfficeKB.com" wrote in message
...
Thank you, Max. I'm still having trouble, though.
What I have is data in d4:d6, and I want d7 to AVERAGE the #'s above.

Then
I have header rows for each new person a couple blank lines and then the
same pattern of data/formulas all the way down (for instance, data in
d13:d15 that I want the average of in d16, and so forth).

Player Year Team W L

Abbott 04 KAN 3 5
03 KAN 1 2
02 SEA 1 3
avg. D7 E7



Player Year Team W L

Acevedo 04 CIN 5 3
03 CIN 2 0
02 CIN 4 2
avg. D16 E16

See what I mean?

--
Message posted via http://www.officekb.com



  #5   Report Post  
Kenny via OfficeKB.com
 
Posts: n/a
Default

Looks like this will do what I need it to do. Thank you, Max!

--
Message posted via http://www.officekb.com


  #6   Report Post  
Max
 
Posts: n/a
Default

You're welcome !
Thanks for the feedback ..
--
Rgds
Max
xl 97
---
GMT+8, 1° 22' N 103° 45' E
xdemechanik <atyahoo<dotcom
----
Kenny via OfficeKB.com wrote in message
...
Looks like this will do what I need it to do. Thank you, Max!

--
Message posted via http://www.officekb.com



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy & Paste Brian Keanie Excel Discussion (Misc queries) 1 February 5th 05 11:56 AM
How to Copy & Paste Rows? none Excel Discussion (Misc queries) 6 January 29th 05 02:37 PM
Paste rows of numbers from Word into single Excel cell BecG Excel Discussion (Misc queries) 1 December 8th 04 04:55 PM
copy paste cell character limit Fred Excel Discussion (Misc queries) 1 December 2nd 04 08:58 PM
copy and paste G Excel Worksheet Functions 2 November 2nd 04 01:56 AM


All times are GMT +1. The time now is 04:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"