Adding in Characters Either Once or Twice

rebel123

Active Member
Joined
Apr 18, 2017
Messages
347
Office Version
  1. 365
Platform
  1. MacOS
Thanks for your help...

Adding in Characters Either Once or Twice.
The correct answers are highlighted in green.
As you can see, there are either one or two underlines added.
I have the correct answer, but I need a drag-down formula please.

You can detect when to add them because basically you are substituting the space with an underline.

Thanks!
 

Attachments

  • Screen Shot 2021-03-27 at 1.02.37 PM.jpg
    Screen Shot 2021-03-27 at 1.02.37 PM.jpg
    147.4 KB · Views: 11
My formula in Post #5 will Remove All extra spaces in between substrings, allowing for only 1 space, Then substitute with an underline ( _ ).
Unless, you have Hidden characters.
 
Upvote 0

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Are you sure my formula in Post #5 didn't solve your problem?
The TRIM function solved your other post here:

So this is just substituting the Spaces after the TRIM.
 
Upvote 0
@rebel123 - your own post that you marked as the solution doesn't contain a solution. However, post #5 obviously solves the problem by using the TRIM function that removes multiple adjacent spaces. Therefore, I switched the solution post to help future readers.

If you have another solution of your own then please post it, then it is perfectly fine to mark your own post as the solution.
 
Upvote 0

Forum statistics

Threads
1,214,947
Messages
6,122,411
Members
449,081
Latest member
JAMES KECULAH

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