![]() |
Perform Row Function Using Macro
I need to use a macro to perform a function (clean) to an entire row.
normally i would record a macro, and then go from there. in this case, i would use another row as a buffer then paste special. that seems like a lot of unnecesary code. there has to be a more eloquent way to do this. using memory spaces, i'd assume. just not sure how. thanks, mark |
Perform Row Function Using Macro
would it be something with a For/End loop?
-m "mvyvoda" wrote: I need to use a macro to perform a function (clean) to an entire row. normally i would record a macro, and then go from there. in this case, i would use another row as a buffer then paste special. that seems like a lot of unnecesary code. there has to be a more eloquent way to do this. using memory spaces, i'd assume. just not sure how. thanks, mark |
Perform Row Function Using Macro
rows(2).ClearContents
or Rows(2).Clear otherwise, define what a clean function is. -- Regards, Tom Ogilvy "mvyvoda" wrote in message ... I need to use a macro to perform a function (clean) to an entire row. normally i would record a macro, and then go from there. in this case, i would use another row as a buffer then paste special. that seems like a lot of unnecesary code. there has to be a more eloquent way to do this. using memory spaces, i'd assume. just not sure how. thanks, mark |
Perform Row Function Using Macro
I guess i was looking for something like this... but this doesn't work yet :-/
Do ActiveCell.Value = WorksheetFunction.Clean(ActiveCell.Offset(0, 1).Value) Loop Until IsEmpty(ActiveCell.Offset(0, 1)) i need the entire row to go through the "Clean" worksheetfunction. -m "Tom Ogilvy" wrote: rows(2).ClearContents or Rows(2).Clear otherwise, define what a clean function is. -- Regards, Tom Ogilvy "mvyvoda" wrote in message ... I need to use a macro to perform a function (clean) to an entire row. normally i would record a macro, and then go from there. in this case, i would use another row as a buffer then paste special. that seems like a lot of unnecesary code. there has to be a more eloquent way to do this. using memory spaces, i'd assume. just not sure how. thanks, mark |
Perform Row Function Using Macro
Do
ActiveCell.Value = _ WorksheetFunction.Clean(ActiveCell.Offset(0,1).Val ue) ActiveCell.offset(0,1).Select Loop Until IsEmpty(ActiveCell.Offset(0, 1)) -- Regards, Tom Ogilvy "mvyvoda" wrote in message ... I guess i was looking for something like this... but this doesn't work yet :-/ Do ActiveCell.Value = WorksheetFunction.Clean(ActiveCell.Offset(0, 1).Value) Loop Until IsEmpty(ActiveCell.Offset(0, 1)) i need the entire row to go through the "Clean" worksheetfunction. -m "Tom Ogilvy" wrote: rows(2).ClearContents or Rows(2).Clear otherwise, define what a clean function is. -- Regards, Tom Ogilvy "mvyvoda" wrote in message ... I need to use a macro to perform a function (clean) to an entire row. normally i would record a macro, and then go from there. in this case, i would use another row as a buffer then paste special. that seems like a lot of unnecesary code. there has to be a more eloquent way to do this. using memory spaces, i'd assume. just not sure how. thanks, mark |
All times are GMT +1. The time now is 05:25 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com