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
0
forum (466)
2/6/2005 12:06:51 PM
excel.misc 78881 articles. 5 followers. Follow

5 Replies
724 Views

Similar Articles

[PageSpeed] 59

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 <at>yahoo<dot>com
----
Kenny Kendrena via OfficeKB.com <forum@OfficeKB.com> wrote in message
news:657a42f69bbd4fd6be700074033786d1@OfficeKB.com...
> 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


0
demechanik (4694)
2/6/2005 12:56:16 PM
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
0
forum (466)
2/6/2005 8:21:16 PM
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="","",Sheet1
!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 <at>yahoo<dot>com
----
"Kenny Kendrena via OfficeKB.com" <forum@OfficeKB.com> wrote in message
news:c5fb6ef0601447c5bf2b741fc0a98df0@OfficeKB.com...
> 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


0
demechanik (4694)
2/6/2005 11:09:47 PM
Looks like this will do what I need it to do. Thank you, Max!

-- 
Message posted via http://www.officekb.com
0
forum (466)
2/7/2005 12:30:23 PM
You're welcome !
Thanks for the feedback ..
--
Rgds
Max
xl 97
---
GMT+8,  1� 22' N  103� 45' E
xdemechanik <at>yahoo<dot>com
----
Kenny via OfficeKB.com <forum@OfficeKB.com> wrote in message
news:104c0487696c4488a6d957bc9b6247be@OfficeKB.com...
> Looks like this will do what I need it to do. Thank you, Max!
>
> --
> Message posted via http://www.officekb.com


0
demechanik (4694)
2/7/2005 12:55:34 PM
Reply:

Similar Artilces:

DVD Copy Pro for Mac
[b]DVD Copy Pro for Mac[/b] is a DVD copy software that can support D9 to D5 compression. With simple operation, it can save DVD in four different ways including directly burning to DVD disc, saving as DVD folder, copying into DVD media format that can be played by DVD Player directly, and converting as ISO file for easy movie management. Now this cool Mac DVD Copy also supports the latest released Snow Leopard. You can download [b][url=http://www.dvd-copy-mac.net/download/dvd-copy-pro-mac.zip]DVD Copy Pro for Mac[/url][/b] freely right now. [b]More information:[/b][quote]http://www.dvd-...

Import/copy calendar in Outlook 2003
I got a new computer and installed Office 2003, and wanted to move my calendar to the new PC. I created a new data file called Personal Folders from Old PC. I wanted to copy my calendar OVER my current one in Personal Folders, but don't see a way to do so. I can copy my old calendar into the Pesonal Folders, but can't delete the new, empty Calendar. So I have Calendar, and Calendar 1 under my Personal Folders. Any way to just import/copy my reminders/appointments into my new calendar? Thanks for any advice. Ck G'Day Cathy, 1. Use the Folder List 2. Click on the OLD Cal...

Secondary Copy
Hi, My customer using Great Plains modified report(Primary Copy). Now he wants new report something similar to the modified GP report with very few changes. I tried to copy the modified report and planned to use us a secondary copy. But the report has temp tables, so I am unable to make secondary copy. Can some one help me in how to make a new report something similar to the modified report, where to launch it. Whether it is possible throught VBA & Modifier? Regards Selvakumar.S A report with a temporary table can only be a primary copy. This is because only a primary copy can b...

local copy of mail
How do you store a copy of all your mail on you local computer when using Exchange? You setup an OST/Offline Folders file. Check with your mail admin if they support that configuration. "Brandon Baker" <brandon@discussions.microsoft.com> wrote in message news:epNKuJ19FHA.4004@TK2MSFTNGP14.phx.gbl... > How do you store a copy of all your mail on you local computer when using > Exchange? > ...

Grouping Rows
I need to group a bunch of rows but I am having some problems. The code lines below works great: Rows("5:8").Select Selection.Rows.Group but I need to group these rows 12,14,16,18,20,22,24,26,28,30. I tried Rows("12,14,16,18,20,22,24,26,28,30").Select Selection.Rows.Group but I get and Overflow error message. When I tried Me.Rows("12:12,14:14,16:16,18:18,20:20,22:22,24:24,26:26,28:28,30:30").Select Selection.Rows.Group I get a Type mismatch error message. What am I doing wrong? HI The 'Rows' object obviously do not ac...

Row hieght formula
I was wondering if there is a formula for row height. I have a lon list, and I want each row that returns a 0 to collapse automatically. Anyone know how to do that -- funktasti ----------------------------------------------------------------------- funktastic's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1600 View this thread: http://www.excelforum.com/showthread.php?threadid=27473 You should hide them. I'm not too keen on Visual Basic, but that's where you'd need to go to automate it. If you'd like to do it manually you can filter the cel...

Copy info from one workbook to another?
I have a problem I have a workbook with the function i want like a discribe here. The problem is i want to split the workbook but i don`t know how. Is it possible to have a main workbook with information from other workbooks at each worksheet? I have 20 workbooks with information. I would like to have a main workbook with on sheet1 every row from the 20workbooks with category1, on sheet2 every row from the 20workbooks with category2, etc, etc. The information in the 20workbooks in always only on sheet. The Colum in which the data is has no fix end. I go to fill in the rows trough a...

Outlook 2000 SP3
How can I copy my mail and calendar to CD so that I can take my received and sent mail history to a new computer with Outlook installed? Thanks. >-----Original Message----- >How can I copy my mail and calendar to CD so that I can >take my received and sent mail history to a new computer >with Outlook installed? Thanks. >. > All your data saves in C:\Documents and Settings\Username\Local Settings\Application Data\Microsoft\Outlook\archive.pst and C:\Documents and Settings\Evgeni\Local Settings\Application Data\Microsoft\Outlook\outlook.pst You can either install instan...

Text to column and paste special transpose
Hi All, I have 1 table like this item_number qty ref 00010-001 3 U34,U36,U43 00013-001 2 U16,U21 12505-001 3 U32,U33,U42 12512-001 3 U5,U6,U27 and 1 want it to become like this item_number qty ref 00010-001 3 U34 00010-001 3 U36 00010-001 3 U43 00013-001 2 U16 00013-001 2 U21 12505-001 3 U32 12505-001 3 U33 12505-001 3 U42 12512-001 3 U5 12512-001 3 U6 12512-001 3 U27 Anybody can help me to program it in macro.. usually i do it manually and have to redo again do to careless. After using Text to Columns on Column C.......comma delimited.........Run the Reorganize macro. Sub ReOrganize...

Copy picture ossice wizard
I have project 2007 standard edition, but the button is not working at all? Any suggestions Hi, The wizard is IMHO useless. Go to Roport, Copy Picture and do without the Wizard what millions have done before the Wizard existed. HTH -- Jan De Messemaeker Microsoft Project Most Valuable Professional +32 495 300 620 For availability check: http://users.online.be/prom-ade/Calendar.pdf "Enrique" <Enrique@discussions.microsoft.com> wrote in message news:72B5AA6C-67AE-468D-B6AE-FF16F52E57BD@microsoft.com... >I have project 2007 standard edition, but the bu...

Paste Values not working in Excel 2003 (?)
Hi, Using Excel 2003 with Win xp Pro I copy a range of cels, then I choose EDIT > PASTE SPECIAL > VALUES and it does NOT paste ALL the cel contentent... It does paste all the cels, but only the first 3 lines of each cel's content. Is there any limitation in the number of characters ? Thanks ALex This is not the exact problem you describe, put perhaps it's related: XL2000: "255 Characters in Cell" Error When Copying Worksheet, at: http://support.microsoft.com/default.aspx?scid=kb;en-us;213548 -- HTH - -Frank Isaacs Dolphin Technology Corp. http://vbapro.com ...

Copy and paste versus copy and insert copied cells
What is the difference between these commands? Try them, it is pretty easy to see the difference -- Regards, Peo Sjoblom "Alana" <Alana@discussions.microsoft.com> wrote in message news:879FED29-5541-41B0-BB2C-7108D42ED593@microsoft.com... > What is the difference between these commands? ...

subtotal copy and paste
Hi I have used the subtotal option in Excel and this is fine. I have also collasped the list so only the subtotal for each category is visible. However I want to copy and paste this list (just the subtotal) into another sheet When I do this it expands and shows all the results. Is it possible to just copy the visible bit. I have looked in paste special but no luck Cheers Hager On Jan 21, 6:38=A0am, Hager <Ha...@discussions.microsoft.com> wrote: > Hi > > I have used the subtotal option in Excel and this is fine. I have also > collasped the list so only the...

Select multiple records based on search
I have adapted Allen Browne's Search form (thank you!) to setup a search criteria. I have figured out how to double click on a particular record on this list which will take me to the Main Update form and the selected record. What I'd like to do is open the Main Update form with all the records in the search list. Any help would be greatly appreciated. Thanks. ...

limit number of rows 7 colloms in a worksheet
is there a way to limit or set the number of rows & collums in a worksheet ? thanks david --- Message posted from http://www.ExcelForum.com/ "davidbrowne17" <davidbrowne17.ya1sm@excelforum-nospam.com> wrote in message news:davidbrowne17.ya1sm@excelforum-nospam.com... > is there a way to limit or set the number of rows & collums in a > worksheet ? No. All worksheets have 256 columns by 65536 rows. You can hide unused rows/columns. But why bother? Hi David, Put this in the ThisWorkbook code module. Adjust to suit the area. Private Sub Workbook_Open() Wo...

Copy above fails one way, copy below fails another way
I have a table of blood pressure readings that looks something like this: A B C D E 11 12 Averages: 134 83 74 13 R# Date Sys Dia Pul 14 4 8/17/08 138 87 72 15 3 8/15/08 130 84 76 16 2 8/12/08 137 83 70 17 1 8/11/08 129 79 76 Cell A14 contains =A15+1 Cell C12 contains =AVERAGE(C14:C17) Cell D12 contains =AVERAGE(D14:D17) Cell E12 contains =AVERAGE(E14:E17) Every time I take a new reading, I want to add a row to the top of the table, between row 13 (the header) and row 14 (the previous top row). I want to push a...

Select / Deselect records
Hi all I have a continuous form which the user can filter on certain criteria, currently this is done with an option box which changes the recordsource of the form to a different query. What I now want is to add a selection routine, so I have stored the data in a table to enable me to add a bound checkbox. I know I can use code like: 'strSql = "UPDATE MyTable SET MyYesNo = False WHERE Select = True;" 'DBEngine(0)(0).Execute strSql, dbFailOnError to deselect records for example, but I am not sure how to do this only on the filtered recordset? Th...

Extra row in CTE
Hi, I have a table (#qed_missing_quarters) with the following rows in it: row_num quarter_end_date 1 2002-09-30 00:00:00.000 2 2002-12-31 00:00:00.000 3 2003-03-31 00:00:00.000 4 2003-06-30 00:00:00.000 5 2003-09-30 00:00:00.000 And I have the following code as a test to traverse across the table: ;WITH qed_missing_values(row_num, quarter_end_date) AS ( SELECT row_num AS [row_num], quarter_end_date AS [quarter_end_date] FROM #qed_missing_quarters WHERE row_num = 1 UNION ALL SELECT a.row_num + 1, a.quarter_end_date FROM #qed_missing_quarters AS a INNER JOIN ...

Business Portal "Copy to Excel" not working in Query pages
Hi, I am using Business Portal 4.0. When browsing through one of the queries pages in Business Portal, i clicked "Copy to Excel" icon. I got an error saying "The Office Web Components (OWC) must be installed to copy results to Excel." at the bottom. I am using Office 2007 on my machine. I came to know that Microsoft Office Web Components will no longer be shipping in Microsoft Office. I tried installing Office 2003 Add-in: Office Web Components from http://www.microsoft.com/downloads/details.aspx?familyid=7287252C-402E-4F72-97A5-E0FD290D4B76&displaylang=en a...

Copying graphs
Hi Is it possible to range value a graph ie I would like to copy the graph to another workbook, show all the information but without the links? Thanks You could copy the chart as a picture, then paste it wherever you want. Select the chart, hold Shift while clicking on the Edit menu, Choose Copy Picture, and select the On Screen and As Picture options, then go to the other workbook/sheet and Paste. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Dixie" <Dixie@discussions.micr...

Copying Views
Is there any way to copy the views under leads so that i can modify them and create different ones. I need to create 15 views and i do not want to do all of them one at a time. Even if there is a way to do it in sql i would love to know -- IT Manager It can be done in SQL, though it's unsupported. What you want need to do is use INSERT ... SELECT to copy rows in the savedquerybase, and give a different savedqueryid For a supported route you can use the CRM web service and create new instances of savedquery. The following article describes how to do this for the userquery, and coul...

Selecting specific work times for every day in a calendar
I want to select specific work times to do work on a project from 9pm to 1am every day but when I tried to do this, the work times I specified would not change. Hi DannyG, Is the specific times you want to reflect, related to the resoruce or the task? Times are set up in various places. The first is the calendars where you can change the time for each individual day or selected days, the second is in the Calnedar tab of the 'tools/options', where the project defaut setting is mad. I suspect from yoru query that you want to change the default working day from 8:0...

Having a go with assembly... how do I copy a double into a register??
I'm trying to speed up a maths routine which consists of much iterative multiplication (and adding and subtraction of ) doubles. Now if I declare my doubles as floats float f double d _asm { mov edx, f //ok mov edx, d //error operand size conflict Can someone show me the error of my ways??? Thanks "Si" <me@you.twang> wrote in message news:sm1gk0l60ng23gilu9b68hkcqi3ub9horn@4ax.com... > > > I'm trying to speed up a maths routine which consists of much > iterative multiplication (and adding and subtraction of ) doubles. > > Now if I de...

EXCEL FILE a copy/a copy/a copy ....filename
when i save my excel file i get a saved copy of the file, not the file itself so my file name of a file i save 7 times can have 7 'a copy' in it eg c./my doc/a copy/a copy/ a copy..............a copy/xx.xls Is the file saved as Read Only? Do you get a message on opening asking you if it's read only? Regards, Alan. "ve" <ve@discussions.microsoft.com> wrote in message news:88C3DEBA-2C2E-4DF0-978B-F823E120458A@microsoft.com... > when i save my excel file i get a saved copy of the file, not the file > itself so my file name of a file i save ...

copy of treeview
Hello, I have to copy information from a treeview to another treeview... The first TreeCtrl is in a dialog and the second it's in another dialog. The application is Dialog Based and I use my oen solution of property sheet. So if I want to call something from another dialog i make i this way: CResultsPageDlg resDlg((CMyAppDlg*)theApp.GetMainWnd()); resDlg.CopyTreeview(m_TreeView.GetRootItem(), m_TreeView.GetRootItem()); useing the solution from http://www.codeguru.com/Cpp/controls/treeview/dragdrop/article.php/c657/ Somebody knows how to do that? Alex What is CopyTreeview method...