Filtering HSTACK(ed) List

SanjayGMusafir

Well-known Member
Joined
Sep 7, 2018
Messages
1,514
Office Version
  1. 2024
Platform
  1. Windows
This is (kind of) in continuation to the post -

Where @Fluff gave me a suitable solution as per the times.

Since I have upgraded my system to Excel 2024, I thought of doing things differently and efficiently.

Can't say about doing efficiently :unsure: as I made my formula longer. And arrived at a new challenge.

Purpose -

To filter a table collect mobile number in one list where
  • 1, 4, 7, 10, 13, 16, 19 , 22th columns contain mobile numbers,
  • adjacent columns indicating whose number are they, and
  • second adjacent column indicating whether to contact them or not (DND)
  • And, 105th column contains Name
Now this list needs to be compiled in one array where I get -
  • Mobile Numbers
  • Whose number is it
  • And Name (Wanted to avoid XLookup Hazard)
While I kept working step by step using @Fluff 's solution in post -

I made a long complicated formula as below.

Challenge -
With this formula, I get a list where a mobile number (Column 1 of resulting array) is repeated multiple times, there by indicating relationship in column 2 with the person in Column 3.

Help Needed -
  • Can there be a better way of writting this formula?
  • Can we have some way whereby it filters the mobile numbers and thus appearing only once in the list? And, thus indicating Relationship and Name of the person.
The formula I over-worked is below :unsure:

Thanks in Advance

Excel Formula:
=LET(a,FILTER(CHOOSECOLS(Clients[[PMobile]:[Nm]],{1,2,3,105}),(Clients[PMobile]<>"")*(Clients[sP]="")),
          b,FILTER(CHOOSECOLS(Clients[[PMobile]:[Nm]],{4,5,6,105}),(Clients[OMobile]<>"")*(Clients[sO]="")),
          c,FILTER(CHOOSECOLS(Clients[[PMobile]:[Nm]],{7,8,9,105}),(Clients[FMobile]<>"")*(Clients[sF]="")),
          d,FILTER(CHOOSECOLS(Clients[[PMobile]:[Nm]],{10,11,12,105}),(Clients[MMobile]<>"")*(Clients[sM]="")),
          e,FILTER(CHOOSECOLS(Clients[[PMobile]:[Nm]],{13,14,15,105}),(Clients[SMobile]<>"")*(Clients[sS]="")),
          f,FILTER(CHOOSECOLS(Clients[[PMobile]:[Nm]],{16,17,18,105}),(Clients[C1Mobile]<>"")*(Clients[sC1]="")),
          g,FILTER(CHOOSECOLS(Clients[[PMobile]:[Nm]],{19,20,21,105}),(Clients[C2Mobile]<>"")*(Clients[sC2]="")),
          h,FILTER(CHOOSECOLS(Clients[[PMobile]:[Nm]],{22,23,24,105}),(Clients[RMobile]<>"")*(Clients[sR2]="")),
i,VSTACK(a,b,c,d,e,f,g,h),
          j,CHOOSECOLS(i,1),
          k,IFS(LEN(j)>10,TEXT(j,"##########"),TRUE,91&j),
          l,CHOOSECOLS(i,2),
          m,CHOOSECOLS(i,3),
          n,CHOOSECOLS(i,4),
o,HSTACK(k,l,n),
          p,UNIQUE(o,TRUE,TRUE),
SORT(p,1,1))
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.

Forum statistics

Threads
1,224,937
Messages
6,181,858
Members
453,068
Latest member
DCD1872

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