Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

List of two digit numbers

Featured Replies

I'm wondering if someone could suggest a calculation to convert a list of numbers into a list of two digit numbers. 

 

For example: 

"1¶3¶9¶14¶22"

would be converted to..

"01¶03¶09¶14¶22"

 

In other words the single digit numbers would have a "0" placed in front. 

 

Thanks!

  • Author

I found a solution using Comment's custom function, "SubstituteValues". 

 

:)

Well, there are only 10 single-digit numbers (9 if you exclude 0) - so substituting them with their two-digit equivalents would seem like the cheapest way to go.

Just to clarify, I meant a straightforward hard-coded substitute, e.g. =

Let ( [
sub = Substitute ( ¶ & listOfValues & ¶ ;
[ "¶1¶" ; "¶01¶" ] ;
[ "¶2¶" ; "¶02¶" ] ;
[ "¶3¶" ; "¶03¶" ] ;
...
[ "¶9¶" ; "¶09¶" ] )
] ;
Middle ( sub ; 2 ; Length ( sub ) - 2 )
)

The custom function is designed for cases where the substitution pairs are not known in advance - for example, when there is a table of dictionary terms that the users can modify.

  • Author

Awesome, thanks for the tip!  I never would have figured out that last part:

Middle ( sub ; 2 ; Length ( sub ) - 2 )

 

Without it, the substitute ignores the first value because it is not preceded by a newline character ("¶")

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.