what does --LEFT(A5,{1,2,3})) mean?

psrs0810

Well-known Member
Joined
Apr 14, 2009
Messages
1,109
In my lookup formula I have =LOOKUP(1000,--LEFT(A5,{1,2,3})), what does the lookup vector saying?
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi

LEFT(A5,{1,2,3}) generates an array with the 3 results of the Left() function.

For ex., if the value is "12abc" you get the result {"1","12","12a"}
 
Upvote 0
See here for an example of it's usage. Post#8
http://www.mrexcel.com/forum/showthread.php?t=567604

Althoug I changed {1,2,3}
to
ROW(B$1:INDEX(B:B,LEN(A1)))

That produces an array of numbers from 1 to the # of Characters in A1.
So if A1 is 10 characters long, that would produce
{1,2,3,4,5,6,7,8,9,10}
If A1 is only 4 characters long, it would be {1,2,3,4}


Hope that helps.


Note, this is also an example of a circular reference...:rofl:
 
Upvote 0
The -- is coercing numbers stored as text to actual numbers. So the formula is finding the first consecutive number in the string by being larger than the largest possible value 999.

Excel Workbook
AB
599a99
61a21
79aa9
Sheet1
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

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