Add comma after specific text and location

retrac

New Member
Joined
Aug 11, 2006
Messages
25
Office Version
  1. 365
Platform
  1. Windows
Hi. I am trying to develop a formula to add a comma after every: "=1" or "<>1"

example: if(AND(KO9=1MA9=1XJ9=1RG10=1RW10=1ZR10=1LG11<>1ZR11=1),11,"")

note: the number of characters before the "=1", or "<>1" may change, ie KO9 to AFD13
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Hi. I am trying to develop a formula to add a comma after every: "=1" or "<>1"

example: if(AND(KO9=1MA9=1XJ9=1RG10=1RW10=1ZR10=1LG11<>1ZR11=1),11,"")
Do you really mean "after every"... even the one I highlighted in red?
 
Upvote 0
Not before the closing parenthesis, you are correct. I was trying to limit the number questions and perhaps figure it out. Thanks!
 
Upvote 0
Not before the closing parenthesis, you are correct. I was trying to limit the number questions and perhaps figure it out. Thanks!
See if this formula does what you want...

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"=1","=1,"),"<>1","<>1,"),",)",")")
 
Upvote 0
Solution

Forum statistics

Threads
1,215,221
Messages
6,123,699
Members
449,117
Latest member
Aaagu

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