Is it possible to make TYPE and CELL functions to work on a selected range?

Rnkhch

Well-known Member
Joined
Apr 28, 2018
Messages
578
Office Version
  1. 365
Platform
  1. Windows
Hello,

Just wondering if it is possible to make the TYPE and CELL functions work on a selected range, such that the output would be a spill corresponding to each of the cells (and not the entire selection) within the selected range. Here is an example of what I mean exactly:

Blank power workbook1
ABCDEFGHIJKLMN
14475014475044750
2ant53g6TRUE#DIV/0!t?
37.9#N/A#SPILL!FALSEh 89book8-Jul8iTRUE
4
5individual cells dragged:2221121416122
611616422121124
7
8selected range:64
9
10
11individual cells dragged:lllvvlvvvbll
12vvvvllvlvvlv
13
14selected range:l
15
16
Sheet1
Cell Formulas
RangeFormula
K1K1=TEXT(J3,10)
J1J1=VALUE(J3)
J2J2=1/0
C3C3=NA()
D3D3={1,2,3}
G3G3=IF(C1>2,1,"")
B5:M6B5=TYPE(B2)
B8B8=TYPE(B2:M3)
B11:M12B11=CELL("type",B2)
B14B14=CELL("type",B2:M3)



Here, B8 returns the type of the entire selection (which is of course its expected job), but would it be possible to make the formula in B8 to spill the same results as in B5:M6? And similarly, would it be possible to make the formula in B14 to spill the same results as in B11:M12?

Thanks for any input 🤗
 
You cannot use Row or Column on an array, only on a range.
 
Upvote 0

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
Ok, this is getting more interesting.

It is working with the MAP function, and although it is not necessary, it works with LET function as well (and also as a Lambda function).

Excel Formula:
=MAP(B2:M3,LAMBDA(cll,CELL("type",cll)))
=LET(range,B2:M3,MAP(range,LAMBDA(cll,TYPE(cll))))
=LAMBDA(range, MAP(range,LAMBDA(cll,CELL("type",cll))))(B2:M3)

Excel Formula:
=MAP(B2:M3,LAMBDA(cll,TYPE(cll)))
=LET(range,B2:M3,MAP(range,LAMBDA(cll,CELL("type",cll))))
=LAMBDA(range, MAP(range,LAMBDA(cll,TYPE(cll))))(B2:M3)
 
Upvote 0
Solution
This is fabulous and indeed very interesting! Thank you! 🤗 Very educational thread 🧐

I'm cooking some interesting LAMBDAs one of which will use this thread's solution. I'll post them sometime soon and would love to hear you guys' feedback.
 
Upvote 0
This is fabulous and indeed very interesting! Thank you! 🤗 Very educational thread 🧐

I'm cooking some interesting LAMBDAs one of which will use this thread's solution. I'll post them sometime soon and would love to hear you guys' feedback.
👍
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,154
Members
453,021
Latest member
Justyna P

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