Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I increment a string value in Google Spreadsheet?

Long time Lurker reporting in! My issue is I'm not sure how to increment an Item no. It follows this format : LK0001 the row below it will be LK0002, below that LK0003 and so on I'm not sure how to automate this process, as you can tell I'm fairly new to google spreadsheets Sorry if it's already answered , I just can't seem to find it! Thanks!

Weej

like image 552
Weej Jamal Avatar asked Jan 17 '23 05:01

Weej Jamal


1 Answers

First of all, I would suggest using the following ID build-up:

LK1000

This way characters (LK) can be separated from integers (1000). Otherwise you would face the problem, that if you increase LK0009 by 1 it becomes LK00010 and not LK0010

ID's need to be "hard coded", meaning =CONCAT or =A1+1 or =MAX(A:A)+1 are not allowed.

Either go by typing LK+max. number and use the ID as a text or go for the integers and use CONCAT when needed.

If you chose to go with the integers, you can easily increment them by doing this: enter image description here

and then dragging it downwards, yielding:
enter image description here

I've prepared an example for you: How do I increment a string value in Google Spreadsheet?

like image 51
Jacob Jan Tuinstra Avatar answered Jan 25 '23 14:01

Jacob Jan Tuinstra