multiple statements IF

JULIANA

New Member
Joined
Nov 6, 2014
Messages
2
hi all,
iam new in excel, so dont have knowledge about it. I have the situation:
columns with 11 digit numbers. WE need to break it 5-4-2.
I need to remove the "0" when it is the first character of 5, then 4, then 2.
So i came up with this:

=REPLACE(B9,SEARCH("0",B9,6),1,"")

FIRST OF 5=SEARCH("0",B2,1)
FIRST OF 4=SEARCH("0",B9,6)
FIRST OF 2=SEARCH("0",B18,10)

BUT I NEED TO INCLUDE ALL THE 3 LOGIC TO THE FORMULA, SO I DID:

=REPLACE(B11, IF(ISNUMBER(SEARCH("0",B11,1)),SEARCH("0",B11,6),SEARCH("0",B11,10)),1,"")

THE LAST LOGIC (FIRST 0 OF 2 RIGHT NUMBERS) IS RESULTING IN A WRONG NUMBER. I DONT KNOW WHAT IM DOING WRONG HERE, I DONT WANT TO SPLIT THE NUMBERS AND DO EVERYTHING MANUALLY.

CAN SOMEONE HELP ME WITH THIS FORMULA, PLZ.
THANK YOU.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Try TextToColumn

NO, THIS DOESNT WORK.

HERE R FEW EXEMPLES OF NUMBERS I HAVE:
00000010016
00000010020
00000010030
47335071483
49884083205
50383026915
50383026930
50383027060
51660014190
66685100100
66685100200
51672130200
51672131200

N I WANT THEM TO BECOME LIKE THIS:

0000010016
0000010020
0000010030
4733571483
4988483205
5038326915
5038326930
5038327060
5166014190
6668510010
6668510020
5167213020
5167213120

<colgroup><col></colgroup><tbody>
</tbody>
 
Upvote 0
Sorry I could not reply until now, but I was in the hospital for surgery. Now I had access to the phone ...
Try this formula:
=IF(RIGHT(LEFT(A1,6),1)="0",LEFT(A1,5)&RIGHT(A1,5),REPLACE(A1,SEARCH("0",A1,11),1,""))
 
Upvote 0

Forum statistics

Threads
1,215,200
Messages
6,123,611
Members
449,109
Latest member
Sebas8956

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