Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Populated cells until a specific range 1

Status
Not open for further replies.

Bass71

MIS
Jun 21, 2001
79
Hi;
This has dogging for some time. All I need to do is populate cells along one row until cell IR1. I cannot for the life of me figure out the correct syntax...

Do Until Range.Select = ("IR1")
ActiveCell.Value = """"
ActiveCell.Offset(0, 1).Select
Loop

Thanks.........
 
Do Until activecell.column = 252
ActiveCell.Value = """"
ActiveCell.Offset(0, 1).Select
Loop

That will work for you!


Are You trying to clear the cells or populate them with double-quotes?



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Then again this one-liner will do the samething:

Range(ActiveCell, ActiveCell.Offset(0, 252 - ActiveCell.Column)) = """"

It will populate all of the active cell to column IR)

But if you only want to fill Row one (up to IR) with quotes you can use :

Range("A1:IR1") = """"

Hope this helps!


Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
You could also manually select the cells you want to fill, and then enter the value you want for all of the cells by pressing Ctrl+Shift+Enter.

NOTE: Be careful that you don't enter a formula with this unless you wish to have an array formula!

I am giving you all of these possibilities because I wasn't sure if you got the others, and I couldn't tell by reading your post if you wanted to automate this or not.

Good Luck!



Peace! [peace]

Mike

Never say Never!!!
Nothing is impossible!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top