Cell proceeeded by an apostrophe

Donal28

Well-known Member
Joined
Apr 23, 2010
Messages
527
Hi All

I'm trying to run formulas for reports on spreasheets but am finding that the format of all the numbers on these spreadsheets are Cell proceeeded by an apostrophe. I've tried a find an replace the for these with blank spaces but it isn't recognising the apostrophes fopr some reason. The fomula I'm trying to run is

=COUNTIF(O:O,0)

Any help on this would be very much appreciated

Regards
Donal
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Hi Donal

Select the column and go Data>TextToColumns>Finish. This should convert all the 'numbers' to proper numbers.

Your countif will only count O col cells which have the value 0.
 
Upvote 0
Try

=COUNTIF(A:A,"=0")

the inverted commas in the countif formula are required

But beware!:eeek:

Any solution like the one below

=SUMPRODUCT(--(VALUE(A:A)=0))

Or a solution which forces a change to numeric (like *1)

will all count blanks as zero as it will turn all of them into numbers so you will get an answer of about a million as it picks up all the empty cells below your data.
 
Upvote 0
Hi Donal

Select the column and go Data>TextToColumns>Finish. This should convert all the 'numbers' to proper numbers.

Your countif will only count O col cells which have the value 0.

Thanks for the reply Richard, on the sheet there is numerous columns of numbers. Is it possible to do all these at one time?
 
Upvote 0
Try

=COUNTIF(A:A,"=0")

the inverted commas in the countif formula are required

But beware!:eeek:

Any solution like the one below

=SUMPRODUCT(--(VALUE(A:A)=0))

Or a solution which forces a change to numeric (like *1)

will all count blanks as zero as it will turn all of them into numbers so you will get an answer of about a million as it picks up all the empty cells below your data.

Thanks for the reply....i'm just getting a circular reference error when I use

=COUNTIF(A:A,"=0")
 
Upvote 0
Hi Donal

Select all the cells in one big contiguous range (ie no multiple selections) and then open up the Visual Basic Editor (Alt+F11) and open up the Immediate Window (Ctrl+G) and type in the following:

Selection.Formula = Selection.Value

this *should* convert all the text 'numbers' to numeric values.
 
Upvote 0
Hi Donal

Select all the cells in one big contiguous range (ie no multiple selections) and then open up the Visual Basic Editor (Alt+F11) and open up the Immediate Window (Ctrl+G) and type in the following:

Selection.Formula = Selection.Value

this *should* convert all the text 'numbers' to numeric values.

Yes this has worked, thanks :). There are numerous sheets that I will have to do this on....Is there a quick way I do this on multiple sheets instead of doing just one at a time?
 
Upvote 0
Depends on whether you have any merged cells on your sheets - if not then:

Code:
For Each ws In Worksheets:ws.UsedRange.Formula = ws.UsedRange.Value:Next ws

entered in the Immediate Window will work.
 
Upvote 0
Depends on whether you have any merged cells on your sheets - if not then:

Code:
For Each ws In Worksheets:ws.UsedRange.Formula = ws.UsedRange.Value:Next ws

entered in the Immediate Window will work.

Theses spreadsheets reside in different folders example of locations and names of the spreadsheets below:

C:\\irportcdcom\public\TMDS Downloads\TS1\22001 TMDS 11.05.16 B12.xls
C:\\irportcdcom\public\TMDS Downloads\TS2\22002 TMDS 11.05.16 B12.xls
C:\\irportcdcom\public\TMDS Downloads\TS3\22003 TMDS 11.05.16 B12.xls

Is it possible to have a macro access these sheets and run For Each ws In Worksheets:ws.UsedRange.Formula = ws.UsedRange.Value:Next ws?
 
Upvote 0

Forum statistics

Threads
1,224,517
Messages
6,179,240
Members
452,898
Latest member
Capolavoro009

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