Forum Discussion
Scott1417
May 25, 2022Copper Contributor
Auto increment a cell values upon specific character
Looking for a formula to auto increment the first and/or last value (s) iterations into another column cell. For instance, as the text string has more dates then display the value before the firs...
Subodh_Tiwari_sktneer
May 25, 2022Silver Contributor
Please try this...
Assuming your date strings start from A2 then...
In B2
=TRIM(MID(SUBSTITUTE(A2,",",REPT(" ",LEN(A2))),1+(ROWS(A$2:A2)-1)*LEN(A2),LEN(A2)))and then copy it down.
Scott1417
May 25, 2022Copper Contributor
Hi Subodh,
Thank you for the response. The description and excel file I originally provided "missed the mark". I did try your formula. I bet you can get it to work after you review the formula below and see the "new" excel file attached. Some how the formula below achieves what I was attempting to describe. TRIM(RIGHT(SUBSTITUTE(TRIM(A2)," ",REPT(" ",100)),100))
Can you review your formula and compare it to the formula, which one is the better of the two?
Scott
- HansVogelaarMay 26, 2022MVP
If you always want to return the (trimmed) text after the last comma, your new formula is the one to use.
If you want something else, please explain in more detail.
- Scott1417May 26, 2022Copper Contributor