#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Macro help

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Macro help

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Macro help


"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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Macro help

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
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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


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