Using TEXTJOIN and making sure reference cell always has two digits

Nanaia

Active Member
Joined
Jan 11, 2018
Messages
304
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I'm trying to use TEXTJOIN to combine two cells (job number and phase number) into one number. The phase number must always be two digits and I know that by using custom formatting I can make it display as two digits. The problem is when using TEXTJOIN it doesn't look at the formatting, it looks at the value. Is there a way to get TEXTJOIN to add a zero before any number lower than ten?
i.e.: P4=47559, R4=09, [ =textjoin(,,P4,R4) ] gives the result as 475599 not 4755909
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
MrExcelPlayground.xlsm
J
35
4123
512305
Sheet30
Cell Formulas
RangeFormula
J5J5=VALUE(TEXTJOIN(,TRUE,J4,TEXT(J3,"00")))
 
Upvote 0
Solution

Forum statistics

Threads
1,214,606
Messages
6,120,484
Members
448,967
Latest member
visheshkotha

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