Copying a text string in running order

singcbl

Well-known Member
Joined
Feb 8, 2006
Messages
518
I want to copy a text string down a row of column in this manner. The first cell is with the text string, "W01/17" but the cell to the right should be "W02/17", "W03/17", "W04/17" and so on. The normal way of draging the cell handle to the right produce the resulting cell string as "W01/18" which is not what I wanted. Appreciate any help I can get.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
I want to copy a text string down a row of column in this manner. The first cell is with the text string, "W01/17" but the cell to the right should be "W02/17", "W03/17", "W04/17" and so on. The normal way of draging the cell handle to the right produce the resulting cell string as "W01/18" which is not what I wanted. Appreciate any help I can get.
Assuming you have W01/17 in cell A1, put this formula in cell B1 and drag it across...

=REPLACE(A1,2,2,TEXT(MID(A1,2,2)+1,"00"))
 
Upvote 0
Assuming you have W01/17 in cell A1, put this formula in cell B1 and drag it across...

=REPLACE(A1,2,2,TEXT(MID(A1,2,2)+1,"00"))
Better yet, maybe... put this formula in the first cell (assumed to be cell A1) and copy it across...

=TEXT(COLUMNS($A:A),"W00\/17")

If you start in a different column, say, Column F, then use that column's letter in place of the two A's...

=TEXT(COLUMNS($F:F),"W00\/17")
 
Upvote 0
Maybe this...

Put the formula below in the first cell and drag to the right
="W0"&COLUMNS($A1:A1)&"/17"

Hope this helps

M.
 
Upvote 0
oops...
Disregard my suggestion above - it doesn't work properly

M.
 
Last edited:
Upvote 0
Hi Rick, what does this \/ mean in the formula?
The forward slash (the second character) is the slash from the text the OP wants in his output... the backslash (the first character) tells the TEXT function to use the next character as the text character it is... if we did not do that, the TEXT function would see the 00/17 part of the text as being a fraction format with a denominator of 17... with the backslash, the forward slash in the 00\/17 part becomes a simple forward slash character and loses it meaning of being a signal character for fraction format and the 17 that follows it is no longer considered a denominator.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,950
Messages
6,122,438
Members
449,083
Latest member
Ava19

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