Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i need to create a for loop that goes thru all my records in the sheet
each record will go thru a formula and the results will be displayed i one column beside all the records. how do i do it -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is the mechanics to accomplish what you want. It will cycle through all you records using Column A as the focus Column, starting at row 2 (Assumes header row in row 1). The Calculated values will be placed in the First Empty Column next to your data. You can use the Offset method to traverse and make calculations for the other Columns (B, C,...), for each Row
Private Sub LoopRecords( Dim RwCnt as Single, ClmCnt as Singl Dim MyRange as Range, C as Rang RwCnt =ActiveSheet.UsedRange.Rows.Coun ClmCnt = ActiveSheet.UsedRange.Columns.Count Set MyRange =Range(Cells(2,1),Cells(RwCnt, 1)) ' << Start at Row 2 column For Each C in MyRang C.Offset(0,ClmCnt).Value = "Your Formula here Using C.Value as your input Next End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i want to loop thru each cell in a certain column and base on the value
in the cell, give it a number and store it in a variable. tis will be done for abt 5 columns and after all the columns are given a number, i will add them up and display it in an empty column beside it. but how do i do it? i need help on this. so thanks --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
help filtering for unique records - urgent :) | Excel Worksheet Functions | |||
URGENT: Function Results in Fractions | Excel Discussion (Misc queries) | |||
Inconsistent Results: Advanced Filter Unique Records Only | Excel Discussion (Misc queries) | |||
Looping Through Records. | Excel Programming | |||
looping Ranking formula - R[1]C[1] | Excel Programming |