CAT = 593, Concatenate and Add

mgirvin

Well-known Member
Joined
Dec 15, 2005
Messages
1,236
Office Version
  1. 365
Platform
  1. Windows
Dear Smartest Excelers In The World,

In cell A1 I have the letter C

In cell A1 I have the letter A

In cell A1 I have the letter T

In the range E1:E26 I have the letters A to Z

In the range F1:F26 I have some numbers from 1 to 9 that are associated with each letter. For example, the number 5 is associated with C, the number 9 is associated with A, and the number 3 is associated with T.

I have used this formula to go from C-A-T in cells A1, A2, and A3 to the number 593 (I used the key strokes Ctrl + Shift + Enter to enter formula):

=MCONCAT(LOOKUP(A1:A3,E1:E26,F1:F26))+0

Is there a better way to do this (better = shorter formula)?
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Howdy Mike

This is an alternative (not saying it's better though ;)):

=SUM(LOOKUP(A1:A3,E1:F26)*10^(3-ROW(A1:A3)))

Confirmed with Ctrl+Shift+Enter
 
Upvote 0
try minor revision to your formula

=--MCONCAT(LOOKUP(A1:A3,E1:F26))
 
Upvote 0
Dear RichardSchollar,

Your formula is so good! What a great pair of glasses you had on when you looked at this problem. I like it because it does not require that I use a MoreFuc, AND:

The “10^(3-ROW(A1:A3))” is such a great Excel method for doing what we did in 4th grade when we learned to multiply! I will definitely be adding the “10^(3-ROW(A1:A3))” trick to my Excel toolbox.


Dear Dave Patton,

Your formula is also good! I like that you have simplified LOOKUP to two arguments and used the double negative.


Dear rconverse,

The double negative replaces the +0; both convert the text to a number.


Hanging out at the Mr Excel Message Board is better than eating candy (or drinking beer)!
 
Upvote 0

Forum statistics

Threads
1,214,848
Messages
6,121,917
Members
449,055
Latest member
KB13

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