LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
tom tom is offline
external usenet poster
 
Posts: 570
Default How to write a for loop to get the range between a ,b columns


Dim x,y As Integer

NumRows = Range("B3", Range("B3").End(xlDown)).Rows.Count

Range("C2").Select


For x = 1 To NumRows

For y= cells(A).value to cells(B).value
'which code we have to write for comparing a1,b1 are equal or not
ActiveCell.FormulaR1C1 = "=Sum(RC[-1]+1)"

ActiveCell.Offset(x, 0).FillDown
Next
Next
 
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
Match, then Look Left 4 Columns, then Loop to End of Range ryguy7272 Excel Programming 9 November 22nd 08 08:42 PM
Write variables from a loop, once only Novaloc Excel Programming 1 October 11th 05 04:10 AM
How to write a vba loop for Excel Paul Excel Programming 1 June 4th 05 06:24 AM
Loop,Compare,Write Michael168[_75_] Excel Programming 1 May 25th 04 06:41 PM
Show one range in a combobox and write the 2nd range! Kevin Excel Programming 1 October 17th 03 05:52 AM


All times are GMT +1. The time now is 12:23 AM.

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"