Hi all,
I cannot get this formula to work. I tried to using wildcards, but those do not work at all.
So one cell $J236 for example has this text in the cell:
my formula is at it stands:
=IF($I236="","",IF(ISNUMBER(SEARCH(" - ",$J236)),SUBSTITUTE($J236," - "," "),IF(ISNUMBER(SEARCH(" -",$J236)),SUBSTITUTE($J236," -"," "),IF(ISNUMBER(SEARCH("- ",$J236)),SUBSTITUTE($J236,"- "," "),$J236))))
so the desired end result should be the text about without the - in the whole text.
Before anyone mentions using the replace tool/button on the toolbar, I know that already, but my spreadsheet is set up to eliminate me having to use that function.
the above formula does work to an extent - the result is below:
It also works for text in a cell where there is a space before the - followed by text, but it will not do work if the - follows text/number and a space, hence the above issue.
Any help is appreciated.
Wayne
I cannot get this formula to work. I tried to using wildcards, but those do not work at all.
So one cell $J236 for example has this text in the cell:
Mechanical Services - HVAC Pipework - Block B First Floor- Strip Out |
my formula is at it stands:
=IF($I236="","",IF(ISNUMBER(SEARCH(" - ",$J236)),SUBSTITUTE($J236," - "," "),IF(ISNUMBER(SEARCH(" -",$J236)),SUBSTITUTE($J236," -"," "),IF(ISNUMBER(SEARCH("- ",$J236)),SUBSTITUTE($J236,"- "," "),$J236))))
so the desired end result should be the text about without the - in the whole text.
Before anyone mentions using the replace tool/button on the toolbar, I know that already, but my spreadsheet is set up to eliminate me having to use that function.
the above formula does work to an extent - the result is below:
Mechanical Services HVAC Pipework Block B First Floor- Strip Out |
It also works for text in a cell where there is a space before the - followed by text, but it will not do work if the - follows text/number and a space, hence the above issue.
Any help is appreciated.
Wayne