Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I needed help with a macro that can fill the cells beneath it until it reaches the next entry, then do the same until it reaches the end of the file. I have researched loops but I haven't figured out how to implement them with a "fill" command. Thanks, Sean Heckathorne |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
one way
Sub fillincolumn() For Each c In Range("a3:a18") If c = "" Then c.Value = c.Offset(-1) Next End Sub -- Don Guillett SalesAid Software "Sean H" wrote in message ... Hi, I needed help with a macro that can fill the cells beneath it until it reaches the next entry, then do the same until it reaches the end of the file. I have researched loops but I haven't figured out how to implement them with a "fill" command. Thanks, Sean Heckathorne |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "Sean H" wrote in message ... Hi, I needed help with a macro that can fill the cells beneath it until it reaches the next entry, then do the same until it reaches the end of the file. I have researched loops but I haven't figured out how to implement them with a "fill" command. Thanks, Sean Heckathorne The fastest way i know of presuming your trying to fill blank cells with a given value is: Range(start,end).SpecialCells(xlBlanks).Value = your value Otherwise u need to grind thru each cell in the range, For rowindex = 2 to range("A65536").end(xlup).row if range("A"&rowindex).value = your_test_value then range("A"&rowindex).value = your_value next rowindex |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Debra Dalgleish has some techniques at:
http://contextures.com/xlDataEntry02.html (both manual and by code) Sean H wrote: Hi, I needed help with a macro that can fill the cells beneath it until it reaches the next entry, then do the same until it reaches the end of the file. I have researched loops but I haven't figured out how to implement them with a "fill" command. Thanks, Sean Heckathorne -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |