#1   Report Post  
Posted to microsoft.public.excel.misc
dan dan is offline
external usenet poster
 
Posts: 866
Default MACRO Problem

repost, need help, thanks.....

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 try to
modify it to work with FORMATS, it "does" 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?
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
End If
Next c
End Sub


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,522
Default MACRO Problem

If desired, send your file to my address below. I will only look if:
1. You send a copy of this message on an inserted sheet
2. You give me the newsgroup and the subject line
3. You send a clear explanation of what you want
4. You send before/after examples and expected results.


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Dan" wrote in message
...
repost, need help, thanks.....

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 try to
modify it to work with FORMATS, it "does" 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?
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
End If
Next c
End Sub



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
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Worksheet Functions 1 May 3rd 08 02:35 PM
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable Enda80 Excel Discussion (Misc queries) 1 May 3rd 08 10:52 AM
Problem using Day() in a macro Marie Excel Worksheet Functions 2 December 14th 07 06:01 PM
Macro problem Richard Champlin Excel Discussion (Misc queries) 1 October 27th 07 03:39 AM
Macro Problem tweacle Excel Worksheet Functions 1 January 12th 06 05:46 PM


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