Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default urgent. looping thru all records and applynig formula to get new results

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default urgent. looping thru all records and applynig formula to get new results

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default urgent. looping thru all records and applynig formula to get new results

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
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
help filtering for unique records - urgent :) crazidazi3 Excel Worksheet Functions 3 October 10th 09 09:39 AM
URGENT: Function Results in Fractions danjones Excel Discussion (Misc queries) 3 April 15th 06 12:11 AM
Inconsistent Results: Advanced Filter Unique Records Only KB Excel Discussion (Misc queries) 1 March 25th 05 02:34 PM
Looping Through Records. Diana[_5_] Excel Programming 6 December 2nd 03 05:40 PM
looping Ranking formula - R[1]C[1] MDC[_2_] Excel Programming 2 October 22nd 03 04:56 AM


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