Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default macro to repeat a formula a set number of rows apart

Hi guys, does any body have a macro that would repeat a formula a set
number of rows apart (1200) in a column?There's multiple worksheets
grouped together in a workbook and it would be nice if it would repeat
in the same column same location in each. the start would be L25. The
formula is a countif that refers to data in the d column. Each
worksheet has a different end of data in the d column. Any help would
be greatly appreciated. You guys have been right on everything so far.
THANKS! steveo

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default macro to repeat a formula a set number of rows apart


Try this

Sub Macro1()
For Each Sheet In Sheets
For N = 25 To 65536 Step 1200
Sheet.Cells(N, 12).Formula = "=Countif(" & Cells(N, 4).Address
& ",100)"
Next N
Next Sheet
End Sub

In the example the formula counts if the Cell in col 4 in the same row
= 100. Just adapt this for your needs.


--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=559693

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
Return SEARCHED Column Number of Numeric Label and Value Sam via OfficeKB.com Excel Worksheet Functions 23 January 30th 06 06:16 PM
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
formula will not fill correctly due to odd number rows Barb Excel Worksheet Functions 3 May 10th 05 09:10 PM
Help with macro formula and variable Huge project Excel Worksheet Functions 0 December 28th 04 01:27 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 10:55 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"