CountIF Function Help

lwilt

Board Regular
Joined
May 16, 2013
Messages
187
I'm having trouble with the countif function. In my spreadsheet in column C starting cell C2 I have text numbers. If the cell starts with an 8 I want to put a leading 0 in front of it otherwise I want to keep the cell the way it is.


Also, if possible for the cells with just a 0 in them can I turn have it write those as null cells where the function is running?

thank you
 

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.
Can you give us few examples of your data and what would you like it to look like?
 
Upvote 0
Joe4 - I did post links...they are above in the 2nd post. The site is running a bit slow this morning for me and it took me a few mins to post them after the orig post loaded since I needed all links for each site.

Alkey...the links to the other site I upload a sample doc. I 'll paste it below for you to see.

KeyREF POINTFORMULALook like
111221112211122
656444446564444465644444
8111118111110811111
212121221212122121212
0
111111111111111
131111311113111
151661516615166
121111112111111211111
447777447777447777
454545445454544545454
299999992999999929999999
0
8996668996660899666
222222122222212222221
111111711111171111117

<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
Solved!!!

here was the solution
=IF(OR(C2={"","0"}),"",IF(LEFT(C2,1)="8","0"&C2,""&C2))
 
Upvote 0

Forum statistics

Threads
1,216,098
Messages
6,128,812
Members
449,468
Latest member
AGreen17

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