[Solved] How to replace part of text from cells in a column

Discuss the spreadsheet application
Post Reply
manosdet
Posts: 18
Joined: Wed Oct 02, 2019 5:41 pm

[Solved] How to replace part of text from cells in a column

Post by manosdet »

Hi people,
I am working on a csv file and i would like to replace part of text in cells at column B with all text from cells at column A.
So A2 cell will replace part of text of B2, A3 from B3 and goes on...
The part of text that i want to be replaced on column B is the same at all cells.
I tried Substitude function but i can't make it work.

Thank you in advance for any help.
Attachments
all_8-6-21c 2.csv
(3.17 KiB) Downloaded 129 times
Last edited by manosdet on Wed Jun 09, 2021 9:55 am, edited 1 time in total.
Windows 7/ OpenOffice 4.1.7
User avatar
MrProgrammer
Moderator
Posts: 4895
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: How to replace part of text from cells in a column B

Post by MrProgrammer »

Thank you for the attachment.
manosdet wrote:The part of text that i want to be replaced on column B is the same at all cells.
I can't give you a formula unless you state specifically what text you want replaced because "the same at all cells" is too vague. All of the cells contain a space, for example.
manosdet wrote:I tried Substitude function but i can't make it work.
This information is of no value. What would be of value is to attach a document demonstrating the difficulty (remove confidential information then use Post Reply, not Quick Reply, and don't attach a picture instead of the document itself) and indicate a specific cell which has an undesired value when you use the SUBSTITUTE function in your attachment, then indicate what the desired value is.

[Tutorial] Ten concepts that every Calc user should know
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
manosdet
Posts: 18
Joined: Wed Oct 02, 2019 5:41 pm

Re: How to replace part of text from cells in a column B

Post by manosdet »

First of all i want to thank you for your reply.
The file that i uploaded is for test purpose (not including any confidential information) and not the one i am using.
I thought that you will give me the formula that i need and i will insert it on real csv file.
All cells of column B contain the text "συσκευασία και περιλαμβάνει Χ τεμάχια."
This is the text that i want to be replaced with the cell from column A.

For example B2 cell contains "4941\n\nΔιαστάσεις 84Χ100 mm\n\nΚατόπιν παραγγελίας διατίθεται και σε επάργυρο, επίχρυσο, αντικέ-μπρονζέ και χαλκό αντικέ.\n\nΗ τιμή είναι ανά συσκευασία και περιλαμβάνει Χ τεμάχια."
A2 cell contains "συσκευασία 2 τεμαχίων"
I want to be "4941\n\nΔιαστάσεις 84Χ100 mm\n\nΚατόπιν παραγγελίας διατίθεται και σε επάργυρο, επίχρυσο, αντικέ-μπρονζέ και χαλκό αντικέ.\n\nΗ τιμή είναι ανά συσκευασία 2 τεμαχίων"

Thank you again
Windows 7/ OpenOffice 4.1.7
User avatar
robleyd
Moderator
Posts: 5055
Joined: Mon Aug 19, 2013 3:47 am
Location: Murbko, Australia

Re: How to replace part of text from cells in a column B

Post by robleyd »

Hopefully the attached sample spreadsheet will help you. The formula for the substitution is in a separate column; I have translated your text to English for my convenience. There is a comment attached to the cell with the formula to give a little more information.
Attachments
substitute.ods
(9.32 KiB) Downloaded 136 times
Cheers
David
OS - Slackware 15 64 bit
Apache OpenOffice 4.1.15
LibreOffice 24.2.1.2; SlackBuild for 24.2.1 by Eric Hameleers
manosdet
Posts: 18
Joined: Wed Oct 02, 2019 5:41 pm

Re: How to replace part of text from cells in a column B

Post by manosdet »

robleyd wrote:Hopefully the attached sample spreadsheet will help you. The formula for the substitution is in a separate column; I have translated your text to English for my convenience. There is a comment attached to the cell with the formula to give a little more information.
It worked like a charm !!!

Thank you so much David
Windows 7/ OpenOffice 4.1.7
Post Reply