an apostrophe in front of the number

theteacher9999

New Member
Joined
Jun 8, 2020
Messages
12
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Hi all,

I'm struggling with this for some time and that's why I'm here.

From the values in column A I'd like to get the result given in the example below. In column B I want to have only the number which is inside the parenthesis in column A. I would like to have an apostrophe before each number.


excel_ap.png


Do you know how to do it quickly with any formula(s) and/or VBA code?
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Hi & welcome to MrExcel.
How about
="'"&SUBSTITUTE(REPLACE(A2,1,FIND("(",A2),""),")","")
 
Upvote 0
Welcome to the forum, try

="'"&SUBSTITUTE(MID(A2,FIND("(",A2)+1,99),")","")
 
Upvote 0
Hi Guys,

I resume our discussion becasue I have faced another issue. I used your solution, then copied and pasted the data as values and finally I got my results. The problem is the data is read by the system I use only if double click on the cells. I mean, what is in cells A2-A4 is ok but in A5-A6 is not.

ex1.png


ex2.png



Do you know how to apply the correct format to all cells in column A without clicking on each cell one by one? Maybe it can be done quickly by VBA?
 
Upvote 0
Why not get rid of the apostrophe & just use
=SUBSTITUTE(REPLACE(A2,1,FIND("(",A2),""),")","")
 
Upvote 0

Forum statistics

Threads
1,215,429
Messages
6,124,835
Members
449,192
Latest member
mcgeeaudrey

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