#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nick Junod
 
Posts: n/a
Default FillDown Macro

Hi,

I am trying to do something that is probably simple. I have data in column
A of my spreadsheet. It is parsed out randomly, meaning that there might be
data in cell A1, A23, A54, A109 so on and so forth.

What I want to do is copy these entries down until they hit the next entry
and then grab that one and copy it down until it hits the next one...

So that A1 will be copied/filled down to A22. A23 will be copied/filled
down to A53...and so on...

I guess it needs to loop?

This is what I have so far and it is not working at all:

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 2/2/2006 by
'

'
Selection.Copy
Range(Selection, Selection.End.(xlDown).offset(-1)).Select
Selection.FillDown
Selection.End(xlDown).Select
End Sub

--
Thanks a million,

Nick Junod
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Kevin Vaughn
 
Posts: n/a
Default FillDown Macro

I copied the following from a previous post for my own edification.
Unfortunately, I don't know the original poster so can't give proper credit.
Try this:

Select column A. Hit F5. Click on Special. Click on Blanks, then OK.
Type = and then hit Up Arrow. Hold Control Key and hit Enter.

--
Kevin Vaughn


"Nick Junod" wrote:

Hi,

I am trying to do something that is probably simple. I have data in column
A of my spreadsheet. It is parsed out randomly, meaning that there might be
data in cell A1, A23, A54, A109 so on and so forth.

What I want to do is copy these entries down until they hit the next entry
and then grab that one and copy it down until it hits the next one...

So that A1 will be copied/filled down to A22. A23 will be copied/filled
down to A53...and so on...

I guess it needs to loop?

This is what I have so far and it is not working at all:

Sub Macro2()
'
' Macro2 Macro
' Macro recorded 2/2/2006 by
'

'
Selection.Copy
Range(Selection, Selection.End.(xlDown).offset(-1)).Select
Selection.FillDown
Selection.End(xlDown).Select
End Sub

--
Thanks a million,

Nick Junod

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
John Michl
 
Posts: n/a
Default FillDown Macro

Nick -
No macro is needed. I saw this method posted a week or two ago. This
is the other posting. (You may need to change references for your
situation.)

1. Place your cursor in cell A2.
2. Hold the Shift key down and then use PageDown and/or the Arrow keys,

etc., to highlight the complete data range.
3. From the menu, select Edit, Go To, Special, Blanks.
4. With the "funny" range selected, build a formula:
a. Press "=" and then the UP arrow.
b. Hold the CTRL key down and then press ENTER.

Voila! All of the blank cells now have a formula that evaluate to the
Company number above.

5. Copy the range and use Paste Special, Values to convert the formulas
to
values.

- John Michl (original poster was L. A. McClelland)

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nick Junod
 
Posts: n/a
Default FillDown Macro

Thanks guys! Problem solved.
--
Thanks a million,

Nick Junod


"John Michl" wrote:

Nick -
No macro is needed. I saw this method posted a week or two ago. This
is the other posting. (You may need to change references for your
situation.)

1. Place your cursor in cell A2.
2. Hold the Shift key down and then use PageDown and/or the Arrow keys,

etc., to highlight the complete data range.
3. From the menu, select Edit, Go To, Special, Blanks.
4. With the "funny" range selected, build a formula:
a. Press "=" and then the UP arrow.
b. Hold the CTRL key down and then press ENTER.

Voila! All of the blank cells now have a formula that evaluate to the
Company number above.

5. Copy the range and use Paste Special, Values to convert the formulas
to
values.

- John Michl (original poster was L. A. McClelland)


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
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Macro Filldown Hirsch Excel Worksheet Functions 4 June 6th 05 06:25 PM
Help with macro looping and color query function kevinm Excel Discussion (Misc queries) 10 May 26th 05 01:25 AM
Date macro Hiking Excel Discussion (Misc queries) 9 February 3rd 05 12:40 AM


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