PDA

View Full Version : Find & Replace during cell copy from page 1 to page 2



Sobodad
03-19-2020, 02:27 PM
Is there a way to modify the contents of a cell, during an import process from one page to another ?

I need to import products from a database into a 2nd page for editing, but have the spaces removed from between the words and replaced with a "-".
Currently on Page2, I have "=(Page1!B1)" to import the data, but I cannot use the Find/Replace command on the same cell.
With this I have to 'save' the page, then open it in a new window and 'find/replace all'

Is is possible to have this work in a single command .. ie: Copy Cell1 Data : Replace " " with "-" : Paste Cell2 Data ..

Cell1,Page1: Name Of Product Goes Here
Cell2,Page2: Name-Of-Product-Goes-Here

Does this make sense ???

DocAElstein
03-19-2020, 08:32 PM
Hello Sobodad.
Welcome to ExcelFox
Is something like this what you mean?

_____ Workbook: Sobodad.xlsx ( Using Excel 2007 32 bit )
Row\Col
A
B
C

1Hello Sobodad. Welcome to ExcelFox


2
Worksheet: Sheet1

_____ Workbook: Sobodad.xlsx ( Using Excel 2007 32 bit )
Row\Col
A
B
C

1=SUBSTITUTE(Sheet1!B1," ","-")


2
Worksheet: Sheet2

_____ Workbook: Sobodad.xlsx ( Using Excel 2007 32 bit )
Row\Col
A
B
C

1Hello-Sobodad.-Welcome-to-ExcelFox


2
Worksheet: Sheet2

Alan




http://www.excelfox.com/forum/showthread.php/2230-Built-in-VBA-methods-and-functions-to-alter-the-contents-of-existing-character-strings

Sobodad
03-20-2020, 03:25 AM
OMG ... This is perfect :)

How did I not find this method during my hours of google searching ?
I didn't even know "SUBSTITUTE" was a function I could use .. lol
Thank you Alan, it is so simple now that I have been shown the way :)

DocAElstein
03-20-2020, 04:17 PM
Hi
How did I not find this method during my hours of google searching ?
I didn't even know "SUBSTITUTE" ...
Excel is so vast, almost anything can be done, but also because it so vast, I think that Microsoft long since gave up trying to document it efficiently and clearly.
At the same time the internet is getting flooded with ever more information.
I often can’t find things anymore by a google search that I found already a few years ago…. .

Unfortunately there is no control of the quality of Blogs and info on the internet. But at the same time it is getting easier to post information on the internet. Often the same answer is given , but quickly, and with little explanation. Forums are also guilty of this sometimes. Good quality answers are strangely discouraged..
The quantity goes up and the quality goes down.

ExcelFox distinguishes itself on its quality and reduced quantity. We have fewer posts, but they are more often viewed, especially in the Tips and tutorial sections: ( http://www.excelfox.com/forum/forumdisplay.php/11-Tips-Tricks-amp-Downloads-(No-Questions) )

But there is room for everyone in a big world :)