Problem with incrementing Numbers

Marcin298

New Member
Joined
Jan 31, 2022
Messages
8
Office Version
  1. 2019
Platform
  1. Windows
#hello

Hi, i’m new here and just curious if it’s possible to solve my problem… so…

In column A i got 25 cells with same value:

myphotos_paris_142500.jpg

How to simply rename all that cells in columns with incrementing number 500? Cell A 1 should be:

myphotos_paris_142500.jpg

And next should be:

myphotos_paris_142501.jpg
myphotos_paris_142502.jpg

And max 142999.jpg.

Is it possible by search&swap tool or in cell A 2 and higher i should add a formula? Please help me ?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hi Marcin298,

Welcome to MrExcel!!

Put this formula into cell A2...

=LEFT(A1,15)&VALUE(MID(A1,16,6))+1&".jpg"

...and then copy it down the range A3:A500

Regards,

Robert
 
Upvote 0
Upvote 0
Hi,

Enter formula in A2 and copy down, anything over your "max", just delete:

Cell Formulas
RangeFormula
A2:A12A2=LEFT(A1,15)&MID(A1,16,6)+1&RIGHT(A1,4)


Ok. And how to do it with more harder names?

Start cell is F14 with cell value:

1111111111^^^^OTHERS^^_ENT_GDN_GTW_CO_20160401_142500.pdf

Next should be as previous 142501; 142502 and so on…

I really don’t get it that formula and want it to use for various cell values.
 
Upvote 0
Hi,

Enter formula in A2 and copy down, anything over your "max", just delete:

Cell Formulas
RangeFormula
A2:A12A2=LEFT(A1,15)&MID(A1,16,6)+1&RIGHT(A1,4)
Sir; could you Please help me with it and explain a lil bit more? I want to understand it and use with various cells values. It’s rly important to me. I will be really appriciated.
 
Upvote 0
Hi,

Enter formula in A2 and copy down, anything over your "max", just delete:

Cell Formulas
RangeFormula
A2:A12A2=LEFT(A1,15)&MID(A1,16,6)+1&RIGHT(A1,4)
And it does not work on excel 2k16 :/
 
Upvote 0
And it does not work on excel 2k16 :/
There is no reason the formula @jtakw posted (or the formula @Trebor76 posted, as it is basically the same formula) wouldn't work with 2016, all the functions existed in that version.

LEFT(A1,15) gives the first 15 characters i.e. myphotos_paris_
&
MID(A1,16,6)+1 gives the 6 numbers starting at the 16th character plus 1 added to the number i.e. 142501
&
RIGHT(A1,4) gives the last 4 characters i.e. .jpg

Your new formula would be as below

Cell Formulas
RangeFormula
A2:A10A2=LEFT(A1,47)&MID(A1,48,6)+1&RIGHT(A1,4)
 
Last edited:
Upvote 0
Solution
There is no reason the formula @jtakw posted wouldn't work with 2016, all the functions existed in that version.

LEFT(A1,15) gives the first 15 characters i.e. myphotos_paris_
&
MID(A1,16,6)+1 gives the 6 numbers starting at the 16th character plus 1 added to the number i.e. 142501
&
RIGHT(A1,4) gives the last 4 characters i.e. .jpg

Your new formula would be as below

Cell Formulas
RangeFormula
A2:A10A2=LEFT(A1,47)&MID(A1,48,6)+1&RIGHT(A1,4)
Thank you for ur help but look at that. This means that formula is wrong :/
 

Attachments

  • 98C4ED6B-858C-4B78-86D1-A45C129311E2.jpeg
    98C4ED6B-858C-4B78-86D1-A45C129311E2.jpeg
    104.6 KB · Views: 8
Upvote 0
Are you sure that the separators on your version are
Rich (BB code):
,
and not
Rich (BB code):
;
 
Upvote 0
Are you sure that the separators on your version are
Rich (BB code):
,
and not
Rich (BB code):
;
Thank you so much! But in my Polish Excel version commands LEFT;MID;RIGHT; are not supported :/ what’s rly weird proper command in photo. I’m really glad for support.
 

Attachments

  • FECD9995-F29B-4EB8-A9DF-06E13E521BD2.jpeg
    FECD9995-F29B-4EB8-A9DF-06E13E521BD2.jpeg
    97.2 KB · Views: 6
Upvote 0

Forum statistics

Threads
1,214,957
Messages
6,122,472
Members
449,087
Latest member
RExcelSearch

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