Need to show remove * and add **

sksanjeev786

Well-known Member
Joined
Aug 5, 2020
Messages
883
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi Team

Need help to remove only "*" from the number and where ever we have "**" need to show as ** only
For example: AS13 = I need as only 39 and AT13 need as only "**" (No number for that criteria )

Cell Formulas
RangeFormula
AS9:BE14AS9=IF(AS$1=$C$1,INDEX(INDIRECT("'"&$A$2&"'!A"&$B$7&":IV"&$C$7&""),MATCH($D9,INDIRECT("'"&$A$2&"'!A"&$B$7&":A"&$C$7&""),0)+1,AS$2),INDEX(INDIRECT("'"&$A$2&"'!A"&$B$6&":IV"&$C$6&""),MATCH($D9,INDIRECT("'"&$A$2&"'!A"&$B$6&":A"&$C$6&""),0)+1,AS$2))


Thanks in advance
Sanjeev
 
Last edited:

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Try this:

=IF(RIGHT(OldFormula,2)="**","**",IF(RIGHT(OldFormula,1)="*",SUBSTITUTE(OldFormula,"*","")))
 
Upvote 0
Try this:

=IF(RIGHT(OldFormula,2)="**","**",IF(RIGHT(OldFormula,1)="*",SUBSTITUTE(OldFormula,"*","")))
Work well:)

Thank you so much

i have 2 more scenarios in my data file added below I need output as G column

FS_.xlsx
CDEFG
4633*3333
4733******
48-*FALSE-
49-FALSE-
Mixture FS
Cell Formulas
RangeFormula
E46:E49E46=IF(RIGHT(C46,2)="**","**",IF(RIGHT(C46,1)="*",SUBSTITUTE(C46,"*","")))


Thanks in advance:)
 
Upvote 0
What if it's just a number, say, AS9? It would show as FALSE.

Excel Formula:
=IF(RIGHT(OldFormula,2)="**","**",IF(RIGHT(OldFormula,1)="*",SUBSTITUTE(OldFormula,"*",""),OldFormula))

Should catch those as well. Another observation (maybe :) ) is it seems you have a space in between numbers and asterisks.
 
Upvote 0
What if it's just a number, say, AS9? It would show as FALSE.

Excel Formula:
=IF(RIGHT(OldFormula,2)="**","**",IF(RIGHT(OldFormula,1)="*",SUBSTITUTE(OldFormula,"*",""),OldFormula))

Should catch those as well. Another observation (maybe :) ) is it seems you have a space in between numbers and asterisks.

thank you so much for your observation Aycan:)

We may have that scenario for other data files

so definitely it is going to help us :)

Thank you so much for your time on this:)
 
Upvote 0

Forum statistics

Threads
1,215,014
Messages
6,122,697
Members
449,092
Latest member
snoom82

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top