-5

I want to add suffix ')' in all the cells in excel which are in '(XXX' format.

Example:

Data:     (1123   (212    254   123   (124   (12

desired:  (1123)   (212)   254   123   (124)   (12)

Thanks, Srinivas K.

Scott Craner
  • 148,073
  • 10
  • 49
  • 81
  • 1
    do you want to do this in place or in another range? – Scott Craner Oct 30 '19 at 13:25
  • 1
    Please refer to [ask] a question with a [mcve]. Be clear about your current data, expected output and the route you are going (VBA/Functions) with your own attempt included and let us know what part you are struggling with. – JvdV Oct 30 '19 at 13:34

1 Answers1

1

Create a row or column next to your data, depending on how it's laid out, and use:

=IF(AND(LEFT(A1,1) = "(",  RIGHT(A1,1) <> ")"),CONCAT(A1,")"),A1)

Where A1 is your first cell of data you wish to manipulate, then drag down or across for all valid cells.

Saiyanthou
  • 142
  • 8
  • If one is using an older version of Excel, one that does not have `CONCAT`, in this case it can be replaced with `CONCATENATE` or simply `A1&")"` – Scott Craner Oct 30 '19 at 14:01
  • Its working, Thanks Jonathan for the solution & Scott you are right here due to my excel version I was needed to replace concat with suggested – Srinivas Kokkonda Oct 30 '19 at 14:05