LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default VBA column identifier and looping

I require assistance for the following code for (a) how to state all €œAO€ to
be relative and (b) for the code to execute Cols AO AP AQ (skip next 3 cols)
then cols AU AV AW (skip next 3 cols) and so on until Cols BY BZ C(ie 7
times).
As always Thank you in advance

Sub SproductVBA()

Dim i As Long
For i = 4 To 387 Step 32
Cells(i, "AO").Resize(31).FormulaR1C1 = _
"=SUMPRODUCT(--(R4C1:R3000C1=RC13),--(R4C5:R3000C5=R2C41),--(R4C7:R3000C7=R3C41),R4C6:R3000C6)"
Cells(i + 31, "AO").FormulaR1C1 = "=SUM(R[-31]C:R[-1]C)"

Next i
Range("AO4:AO387").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False

End Sub

--
Robert
 
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
Row and Column identifier tabs now showing on sheet 1 George Setting up and Configuration of Excel 2 April 18th 10 04:11 AM
Adding a unique identifier to a column of data Holly[_2_] Excel Worksheet Functions 2 December 9th 07 07:01 PM
Looping through a column hudson40 Excel Programming 1 August 16th 05 03:31 PM
Combo column identifier davegb Excel Programming 11 April 25th 05 08:42 PM
looping from one column to the next Brad Zenner Excel Programming 0 July 21st 03 08:41 PM


All times are GMT +1. The time now is 07:16 PM.

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

About Us

"It's about Microsoft Excel"