Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Loop till value changes

I am making a code in visual basic that has to loop till the value in column
C changes. But I don't know how I can put in the code "loop till value in
column C changes". Would be great if someone could help me! Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,420
Default Loop till value changes


i = 2

Do While Cells(i, "C").Value = Cells(i - 1, "C").Value

i = i + 1
Loop

on exit, Cells(i, "C") will point at the changed cell

--
__________________________________
HTH

Bob

"Ruben" wrote in message
...
I am making a code in visual basic that has to loop till the value in
column
C changes. But I don't know how I can put in the code "loop till value in
column C changes". Would be great if someone could help me! Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 31
Default Loop till value changes

Bob, thanks for your reaction!

Ruben


"Bob Phillips" wrote:


i = 2

Do While Cells(i, "C").Value = Cells(i - 1, "C").Value

i = i + 1
Loop

on exit, Cells(i, "C") will point at the changed cell

--
__________________________________
HTH

Bob

"Ruben" wrote in message
...
I am making a code in visual basic that has to loop till the value in
column
C changes. But I don't know how I can put in the code "loop till value in
column C changes". Would be great if someone could help me! Thanks!




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
Looping till value is 1? Jo[_2_] Excel Discussion (Misc queries) 2 October 3rd 07 09:14 PM
Calculate numbers till 60 Krishna Kumar L Excel Discussion (Misc queries) 9 July 2nd 07 01:24 PM
Auto update till...... comotoman Excel Discussion (Misc queries) 3 October 14th 05 05:25 PM
SUM C IF B=Cap... Till Next B=Cap... cradino Excel Worksheet Functions 6 October 13th 05 12:45 AM
SUM C IF B=Cap...TILL NEXT B=Cap... cradino Excel Worksheet Functions 1 October 10th 05 01:05 AM


All times are GMT +1. The time now is 10:50 AM.

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

About Us

"It's about Microsoft Excel"