madhuchelliah
Board Regular
- Joined
- Nov 22, 2017
- Messages
- 226
- Office Version
- 2019
- Platform
- Windows
Hello Folks, I want to delete few words in A2 cell of all the sheets in my WB. Please go through the 4 strings and their expected results. I want to keep the last numeric value of the string and if the string contains Alphabet as last word it should keep both numeric value and alphabet also.The string always has minimum of 2 and maximum of 4 words. I tried with formulas it doesn't work for all the 4 scenarios at same time. It seems some mathematical coding is required. Anyone have solution or suggestion please heads up. Thank you.
[TABLE="class: grid, width: 300, align: left"]
<tbody>[TR]
[TD]Actual
[/TD]
[TD]Expected
[/TD]
[/TR]
[TR]
[TD]21 C 220
[/TD]
[TD]220
[/TD]
[/TR]
[TR]
[TD]21 C 220 B
[/TD]
[TD]220 B
[/TD]
[/TR]
[TR]
[TD]21 220 B
[/TD]
[TD]220 B
[/TD]
[/TR]
[TR]
[TD]21 220
[/TD]
[TD]220
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 157"]
<tbody>[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 300, align: left"]
<tbody>[TR]
[TD]Actual
[/TD]
[TD]Expected
[/TD]
[/TR]
[TR]
[TD]21 C 220
[/TD]
[TD]220
[/TD]
[/TR]
[TR]
[TD]21 C 220 B
[/TD]
[TD]220 B
[/TD]
[/TR]
[TR]
[TD]21 220 B
[/TD]
[TD]220 B
[/TD]
[/TR]
[TR]
[TD]21 220
[/TD]
[TD]220
[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 157"]
<tbody>[TR]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Last edited: