Formula Question??

jk_Grand_Accounting

New Member
Joined
Dec 11, 2008
Messages
35
I have a bunch of cells with something like this in it: 060-48000-00 & I need a formula that will make excel return 060-48000-10

I need the formula to change the -00 to -10 for each instance.
 

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
Something like usingn an if...

=IF(RIGHT(A1,2)="00",LEFT(A1,FIND("-",A1,5))&"10","")
 
Upvote 0
jk_Grand_Accounting,

Excel Workbook
AB
1060-48000-00060-48000-10
2060-48000-01060-48000-01
3060-48000-02060-48000-02
4060-48000-03060-48000-03
5060-48000-00060-48000-10
Sheet1



The formula in cell B1 copied down:
=IF(RIGHT(A1,3)="-00",LEFT(A1,9)&"-10",A1)


Have a great day,
Stan
 
Upvote 0
Thanks that formula works

but what if I want the formula to just change the first number after the last dash - to a 1 & keep the last number after that exactly as the same no matter what number.
 
Upvote 0
jk_Grand_Accounting,

Excel Workbook
AB
1060-48000-00060-48000-10
2060-48000-01060-48000-11
3060-48000-12060-48000-12
4060-48000-03060-48000-13
5060-48000-10060-48000-10
Sheet1



Have a great day,
Stan
 
Upvote 0
Thanks that formula works

but what if I want the formula to just change the first number after the last dash - to a 1 & keep the last number after that exactly as the same no matter what number.
If your question has not been answered, could you please give some sample data (say 8 or 10 examples) together with the expected results?

If your data format varies at all, please make sure you include a variety of possibilities so that a good, concise solution can be suggested.
 
Upvote 0
That formula worked.....THANKS for your help!!!!!
Again, because we haven't seen much sample data, this is a bit of a guess but from what I can see, this should do the same thing as the last suggestion:

=REPLACE(A1,11,1,1)
 
Upvote 0

Forum statistics

Threads
1,214,641
Messages
6,120,684
Members
448,977
Latest member
dbonilla0331

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