LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
dan dan is offline
external usenet poster
 
Posts: 866
Default Help with Macro's

hello, I had recently received a macro that I was needing some help with.
it seems to work on columns where there are formula's only. when i tried to
modify it to work with FORMATS, it did work on columns with formula's, but
would not paste FORMATS down on columns, "without' formula's.

Is there a way to modify it so that it will? if ok as a different macro,
since using separate macro's anyways... (for paste formula's, formats, all)
not sure what the problem is.. thanks in advance

macro works on columns where cells are filled with a formula only.

what using to try to paste Formats down a column (that does not have
formula's):
1 i will manually copy cell at top, and manually place cursor to top row of
any column i choose (dynamic)
2 with macro paste format down column, to end row, skip rows where column A
has a period "."
3 not yet addressed: way to paste all cells at once without pasting 1 cell
at a time..
can work on later.



Sub PastecellF() 'alt-F (paste cell Format to col)
r = ActiveCell.Row
c = ActiveCell.Column
LastRow = Range("C4").Value
'C4 has: =ROW($A$2058) 'last row

For Each c In Range(Cells(r, c), Cells(LastRow, c))
If Cells(c.Row, "A").Value < "." Then
c.Select

Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False


'Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
'Selection.Cells.PasteSpecial xlPasteFormats
'Selection.PasteSpecial xlPasteFormats

'.Cells.PasteSpecial xlPasteValues
'PasteSpecial xlPasteValues

End If
Next c
End Sub



 
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's are fun Chris Excel Worksheet Functions 0 February 7th 08 06:09 AM
Macro's 148steve Excel Discussion (Misc queries) 4 November 14th 06 09:39 PM
Hide Macro's in Toolbar / Macro's list sparx Excel Discussion (Misc queries) 2 May 6th 06 08:53 PM
Macro's CraigM Excel Worksheet Functions 2 January 17th 06 01:06 PM
macro's ELVIS ARON PRESLEY Excel Worksheet Functions 1 November 10th 04 06:42 PM


All times are GMT +1. The time now is 10:10 PM.

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"