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: 1
Default Change while loop from count to formula


I would like to adapt the following code to use a formula to calculat
the value of 53, like the counter is doing below. For eac
"Currentcolumn" there is a countIf formula in row 8 when that formul
reaches 53 I want to stop adding the value "New" to each column.

What it does now is check the variable totalrow once and if it is les
than 53 it adds the value upto 53 and higher. I want to stop whe
totalrow(8) = 53

Thanks



Dim CurrentColumn As Integer, CurrentRow As Long, totalrow As Long
Count As Byte
With ActiveSheet

For CurrentColumn = 7 To 103
CurrentRow = 11
totalrow = 8
Count = 0
While Count < 53 And CurrentRow <= 298 And .cells(totalrow
CurrentColumn).Value < 53 If .cells(CurrentRow, CurrentColumn).Value
"." Then
.cells(CurrentRow, CurrentColumn).Value = "New"
Count = Count + 1 + totalrow
End If
CurrentRow = CurrentRow + 1
Wend
Next CurrentColumn
End Wit

--
hotherp
-----------------------------------------------------------------------
hotherps's Profile: http://www.excelforum.com/member.php...nfo&userid=505
View this thread: http://www.excelforum.com/showthread.php?threadid=31371

 
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
count rownumbers in loop TUNGANA KURMA RAJU Excel Discussion (Misc queries) 9 October 3rd 05 09:29 AM
loop count TUNGANA KURMA RAJU Excel Discussion (Misc queries) 2 October 1st 05 04:54 AM
How can I loop to find the grouped shapes count David Cuthill Excel Programming 3 January 26th 04 08:22 PM
End loop macro with count Jason C. Excel Programming 1 July 16th 03 01:21 PM


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