Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Replace misc character with previous sheet name

Hi,

I want to replace the # character with ='previoussheetname'!

so #D55 becomes ='PreviousSheet'!D55

Does anyone know how (if) I can make this work?

Cells.Replace What:="#",
Replacement:="='"&Application.Caller.Worksheet.Pre vious.Name&"'!",
LookAt:=xlPart _
, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False,
_
ReplaceFormat:=False


Thanks!
Helen

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Replace misc character with previous sheet name

Application.Caller would probably indicate you are doing this from a User
Defined Function used in a worksheet. If so, a function used that way is not
permitted to make changes to the worksheet except to return a value to the
cell in which it is located.

--
Regards,
Tom Ogilvy


" wrote:

Hi,

I want to replace the # character with ='previoussheetname'!

so #D55 becomes ='PreviousSheet'!D55

Does anyone know how (if) I can make this work?

Cells.Replace What:="#",
Replacement:="='"&Application.Caller.Worksheet.Pre vious.Name&"'!",
LookAt:=xlPart _
, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False,
_
ReplaceFormat:=False


Thanks!
Helen


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
replace new line character ciruliz Excel Discussion (Misc queries) 3 November 16th 06 03:06 PM
replace formula references with previous sheet names [email protected] Excel Programming 0 June 22nd 06 02:30 PM
How do I replace a BEL Character of 7 with a space KBear Excel Discussion (Misc queries) 1 June 6th 06 03:56 PM
How do I replace a character with another? MosesX8 Excel Discussion (Misc queries) 6 June 11th 05 09:25 AM
How to replace this character ... Harish Mohanbabu Excel Programming 2 February 18th 04 04:20 PM


All times are GMT +1. The time now is 04:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"