Use this

Sub EndLoop()

 Range("A2").Select

 Do

 ActiveCell.Value = "2010 Real"

 ActiveCell.Offset(1, 0).Select

 Loop Until ActiveCell.Offset(0, 1).Value = "Total"

 End Sub

 

From: excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com]
On Behalf Of Jorge Marques
Sent: Thursday, July 14, 2011 5:40 AM
To: excel-macros@googlegroups.com
Subject: $$Excel-Macros$$ Help My "Do Loop" statement doesn´t work

 

Hi guys, i have this table where i want to fill the column A with "2010
Real" but stopping when in the same row the column B is "Total" i used Do &
Loop but i can´t seem to find the right code.

 

sub fill2010real()

Do until range("B:B").value = "Total"

range("A:A").value = "2010 Real"

loop

end sub

 

I can´t seem to go around this code :(

 

1001 thanks to all of you!excel-lent as always :)

 

 

-- 
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to