Our batch numbering system was M-00200116.
Here M-002 is the material code which is entered in previous column.
001 is the serial number.
16 is the year last 2 digits.
I used the concatenate formula but the serial number was coming in single digit. How to change the serial number to three digits?
Something like:
=CONCATENATE(C3,TEXT(COUNTIF($C$2:C3,C3),"000"),16)
will get you enough digits in the serial number part.
Related
i have hit wall after trying INT, TIMEVALUE and all other date formatting on the dates in CSV file.
I was able to change few dates using INT and then change the date format but few dates (highlighted in yellow) i am not able to convert to date format. Originally it is string, which i tried changing to Number and Date type before applying formulas but still its not getting formatted correctly.
i have tried MID/LEFT etc. to extract part of it but when joining these parts using "" & "" converts to text and converting it to date resulted in long ##### output, did tried excel advance option ticking Use 1904 date system.
Any help in right direction is much appreciated. i have not found any duplicate question similar to my format, closest i found didnt have time stamp so that formula didnt work either.
Take a look at your date format. The first digit is either 1 or 2 characters and you need to take that variation into account. the nice thing is based on your data that the days is always 2 digits. this simplifies things a little.
Lets start with the basics and assume your first string of a date is in A2. Let us start simply by striping out the numbers from the text one segment at at time while being generic about the position and number of character. So in order to pull out the number for the month, use the following formula:
=LEFT(A2,FIND("/",A2)-1)
Find will look for the position of the / character in the string and return its number. in this case it should be 2. This means its a single digit month. So we only need to pull 1 digit. In the general sense 1 less than the position of the /.
The next task will be to pull the digits for the day. We can do that using a similar formula. This time lets use MID instead of left. In order to for MID to work, we need to define the starting point. This time the general case of the start point will be the first character after the first /. The other nice part about this is we know the number of characters to pull will always be 2. As such you can use the following formula to pull the month:
=MID(A2,FIND("/",A2)+1,2)
(note if your day digits were not consistently 2 then you would have to measure the number of characters between the two / characters and replace the 2 in the formula with you calculation)
In order to pull the year the process is basically the same as for the month with some minor tweaks. The resulting formula I am suggesting is:
=MID(A2,FIND("/",A2,4)+1,4)
Now the reason I used 4 as the starting position for the find is to make the formula work for the case where days could be a single digit. It the closest the second / can be to the start.
now that you have all that you need to combine it together to make the date. This is where the DATE formula comes into play. It works in the following format: DATE(Year, Month, Day). So now we simply grab each of the individual formula and build the DATE formula which should wind up looking like the following:
=DATE(MID(A2,FIND("/",A2,4)+1,4),LEFT(A2,FIND("/",A2)-1),MID(A2,FIND("/",A2)+1,2))
if you get a date that is just bunch of number format the cell to display the date in the format of your choosing.
I have a column of data with numbers stored in text.
The numbers look like this: 735999114002665788
If I select any cell in this column and refer to it with the function =value(), the number shows up as 735999114002665000.
As you can see the last three digits are 0. This happens all the time with numbers this long - but NOT with numbers containing less digits.
Am I trying to convert a number that's too large or what's up? Please help! I've tried every form of text-to-number method with identical results :(
Excel's number precision is 15 digits, which is why you're losing the last three digits when converting your 18 character string
https://support.office.com/en-us/article/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3#ID0EBABAAA=Excel_2016-2013
Excel only allows a maximum of 15 digits of precision for each number in a cell. The reason why this number:
735999114002665788
becomes this:
735999114002665000
is because Excel is choosing to retain the 15 most significant digits in the number. This means that the ones, tens, and thousands digits are being tossed out.
By the way, this question has been asked before on SuperUser, and you can read about it here:
https://superuser.com/questions/437764/why-is-excel-truncating-my-16-digit-numbers
I have in my excel one column that describe one apartment to sell, I want just one information in that column : the number of meters square. I want to know that exist one formula that take x characters inside that description. for example: "Apartmento to sell, 45 m², 2 rooms, 4 bathrooms....." I want the 45 number without I having to look every single line.
Find the position of m²
=FIND("m²",A1,1)
Take the left of the text (cell) and your number should be at the end
=LEFT(A1,FIND("m²",A1,1)-1)
If it always start with Apartmento to sell, 45 m², 2 rooms, 4 bathrooms
=TRIM(REPLACE(LEFT(A1,FIND("m²",A1,1)-1),1,19,""))
If the format is similar for all rows, then do Text to Columns (under the Data tab) and specify the delimiter as a Comma. Then, your second column will only have apartment dimensions
This works regardless of anything else, so long as there are at least two commas in each entry, and the dimensions are always between the first two commas.
I have a date: 9/21/2015. I want to convert this date into the format 39/2015. If the date is in A2, I can easily do this with CONCATENATE(WEEKNUM(A2), "/", TEXT(A2, "yyyy")). However, I can't seem to make Excel realize that these numbers should be ordered. When I go to make a pivot table, the ordering is completely lost. How can I make this work? Do I have to use some sort of serial number (perhaps the serial number for the Monday of each week)?
The formula converts the dates to text and when sorting text, excel looks at the first character then the second and so on. So 2/2015 will come after 19/2015.
To fix that you need to put a two digit week number. Use:
=CONCATENATE(TEXT(WEEKNUM(A1),"00"), "/", TEXT(A1, "yyyy"))
This will put a 0 in front of the first 9 weeks so the get sorted to the top correctly.
I have a column of numbers which varying in length (some of the numbers are 9 characters, while others are 7). I need them to all be 9 characters so I want to add 0s in front of the numbers. For example, if I have the number 0294843 which is 7 characters long, I want to add 2 zeros in the front, so 000284843. Since every number has different lengths (some are 9, 8, 7, 6, etc.) I'd like to find a function that will automatically add zeros dependent on the length. So far I have this:
=IF(LEN(D5)<9, D5, ...)
Where the ... is what I'm not sure what to put in. Thanks!
=TEXT(A1,"000000000")
Where A1 is the cell to pad and the number of 0s is the length you want.
There's no need to use formulas for formatting.
Simply use a custom format. From here:
When you want to display leading zeros for a fixed-length number,
create a custom format with the same number of zeros (0) as digits
that you want to display. For example, if you want to display a
fixed-length number with five digits, create a custom number format
with five zeros.
In your case the custom format would be 000000000