Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 68
Default Macro on Current Row

I want to macro below to work on the current row instead of row 3. Please
help.

Selection.Copy
Range("F3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("F3:G3").Select
Selection.Replace What:="=", Replacement:="=", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Macro on Current Row

with activesheet
with .cells(activecell.row,"F").resize(1,2)
.copy
.pastespecial paste:=xlpastevalues

.replace What:="=", Replacement:="=", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False
end with
end with

I think...


TKS_Mark wrote:

I want to macro below to work on the current row instead of row 3. Please
help.

Selection.Copy
Range("F3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("F3:G3").Select
Selection.Replace What:="=", Replacement:="=", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _
ReplaceFormat:=False


--

Dave Peterson
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
use current year in macro mohavv Excel Discussion (Misc queries) 1 January 8th 08 09:44 PM
macro for current time mangesh Excel Discussion (Misc queries) 0 March 21st 06 08:22 PM
Name of Current Macro running? Nigel Excel Programming 4 December 24th 05 01:46 PM
Macro to advance current row by 1 Tom Ogilvy Excel Programming 2 April 9th 04 01:34 PM
Use current sheet name in Macro Bernie Deitrick Excel Programming 0 January 21st 04 04:48 PM


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