Fill down without formatting macro

M

Mike

Is there a way to design a macro that can perform the 'fill down without
formatting' procedure for cells that I highlight? I've tried to write it but
it busts if I select a different number of cells that I used when I recorded
it. Thanks for the help!
 
B

Bernie Deitrick

Mike,

Post your code - 'fill down' can mean a lot of - well, a few, at least - different things.

HTH,
Bernie
MS Excel MVP
 
S

Shane Devenshire

Hi,

Turn on the macro recorder and record the steps - Tools, Macro, Record New
Macro.

When you finish the fill down, open the Paste Option icon, usually near the
bottom right of the filled range and choose Fill Without Formatting.
 
F

Fred Smith

Why do you need a macro? Why not just get Excel to do it. Right drag the
fill handle, on release choose Fill Formatting Only.

If you really need a macro, simply record this step.

Regards,
Fred.
 
B

Bernie Deitrick

Actually, try this, after selecting the cell to copy, and the area that you want to fill in:

Sub FillDownSelection()
Selection(1).AutoFill Destination:=Selection, Type:=xlFillValues
End Sub

HTH,
Bernie
MS Excel MVP
 
M

Mike

That is exactly what I want to do, but I'd like to record the macro to a
shortcut key that will "Fill Without Formatting" whatever cells I have
selected when I press the shortcut key. The problem is that when I try to
run the macro it fills the same number of cells that I selected when
recording it. I would like this to be dynamic.

Does this make sense?
 
B

Bernie Deitrick

Perfect. That's exactly what I was looking for. It even fills right. Thanks!

Great. And you're welcome, and thanks for letting me know that you got it to work.

Bernie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top