Custom formatted cell with leading zeros not carrying over to CONCATENATE

mjaeger1

New Member
Joined
Jul 1, 2018
Messages
26
Hi All,

I have a quoting tool im working on and hitting a snag.

I was forced to use custom formatting on my 'Length' column so that I could use a =IF formula on the 'breakout' column to automatically populate that cell depending on the value entered in 'length'.

"length' must have leading zeros to make it a 2 digit number (in this case it is one leading zero in the first case (01, 05, 08, 10, 15), and four leading zeros in the second (0001, 0006, 0010, 0120)

The issue is that when i try to use a =concatenate function, it does not carry to leading zeros.

Is there any way to get around this without using a =text function, as there is not always a set number of leading zeros depending on the value?

NBC Fiber QuickQuote - Final - V 1.3 DL.xlsm
CDEFGHIJKLMNO
29Multimode (OM4)Length in Meters (2 digit i.e. 02, 07, 10, 10.5)Breakout
30Side ASide BBase Part Number (xx-Length, yy-Breakout, p-Polarity)
31MPOLC/UPC 2-strandSFH-FH002MRSFH-FH002MRxxMyyKM0132#N/AKMSFH-FH002MR01M32K
32MPOLC/UPC 4-strandSFH-FH004MRSFH-FH004MRxxMyyKM0118#N/AKM 
33MPOLC/UPC 8-strandSFH-FH008MRSFH-FH008MRxxMyyKM1032#N/AKM 
34Side ASide BBase Part Number (xx-Length, yy-Breakout, p-Polarity)Length in (M) (4 digit)Breakout
35MPO 12F (Female Low Loss) S542LL-MPO - 12F (Female Low Loss)S542LL-S542LL-BxxxxM#N/A000432#N/AM 
Fiber Quick Quote Tool
Cell Formulas
RangeFormula
K31K31=IF(I31>=3,"32",IF(I31<3,"18",IF(I31="","")))
L31:L33L31=VLOOKUP(K31,'VLookup PN Generator'!$F$110:$G$112,2,FALSE)
K32:K33,K35K32=IF(I32>=3,"32",IF(I32<3,"18"))
O31O31=IFERROR(CONCATENATE(F31,I31,N31,K31,M31),"")
O32:O33O32=IFERROR(CONCATENATE(F32,I32,H32,L32,M32),"")
D35D35=F35
H35H35=IF(LEN(VLOOKUP(G35,'VLookup PN Generator'!$C$189:$D$190,2,0))=0,"",VLOOKUP(G35,'VLookup PN Generator'!$C$189:$D$190,2,0))
L35L35=VLOOKUP(K35,'VLookup PN Generator'!$C$178:$D$180,2,FALSE)
O35O35=IFERROR(CONCATENATE(F35,L35,I35,N35),"")
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
hello,

you could swap the CONCATENATE for &s which will pull in the whole cell from column I.
So instead of =IFERROR(CONCATENATE(F31,I31,N31,K31,M31),"")
use =IFERROR(F31&I31&N31&K31&M31,"")
 
Upvote 0
hello,

you could swap the CONCATENATE for &s which will pull in the whole cell from column I.
So instead of =IFERROR(CONCATENATE(F31,I31,N31,K31,M31),"")
use =IFERROR(F31&I31&N31&K31&M31,"")
Thank you! Tried this and im getting the same result from the CONCAT function. It strips off the extra zeros and keeps only the number. Is there a formatting change that needs to made for this cell?
 
Upvote 0
Try it like
Excel Formula:
=IFERROR(CONCATENATE(F31,TEXT(I31,"00"),N31,K31,M31),"")
 
Upvote 0
Solution
Try it like
Excel Formula:
=IFERROR(CONCATENATE(F31,TEXT(I31,"00"),N31,K31,M31),"")[/CODE
[/QUOTE]
Try it like
Excel Formula:
=IFERROR(CONCATENATE(F31,TEXT(I31,"00"),N31,K31,M31),"")
Thanks for your reply! The only issue with that format is that the 4 digit format can be anything from 0001 - 0600, where the zeros are dynamic and will change depending on the inputted value. the correct amount of leading zeros is critical for a vlookup further down the sheet to pull an exact 'part number'
 
Upvote 0
What determines if it's 2 or 4 digits?
 
Upvote 0
It will depend upon the item row. Its different for each part variation (one per row). Each row will have a set number of digits. These digits are the "length"
 
Upvote 0
If there is nothing in the data itself that dictates the number of digits, then you will just have to adjust the formula manually.
 
Upvote 0
Cell I35 is the data the CONCAT would be pulling from. I cannot have this cell (I35) formatted as text because the =IF formula in K35 depends on the custom format and wont work if its formatted as text.
 
Upvote 0
hello,

you could swap the CONCATENATE for &s which will pull in the whole cell from column I.
So instead of =IFERROR(CONCATENATE(F31,I31,N31,K31,M31),"")
use =IFERROR(F31&I31&N31&K31&M31,"")
Is there any other way to do it other than this?
 
Upvote 0

Forum statistics

Threads
1,214,561
Messages
6,120,242
Members
448,951
Latest member
jennlynn

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