VBA work around/substitute for CHOOSECOLS in Office 365

Pookiemeister

Well-known Member
Joined
Jan 6, 2012
Messages
626
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
How can I find a work around for the CHOOSECOLS function for VBA? I have read that CHOOSECOLS function does not work yet in VBA. The following code does exactly what I need it to do on the spreadsheet.
Code:
=COUNTA(CHOOSECOLS(FILTER(A:T,(L:L=C165)*(R:R=C168),""),1))

Description of the spreadsheet:
Range(A:T) is my entire Table
Range(L:L) is my work center (Packaging, Maintenance, Processing)
Range(R:R) is the order status (Open or Closed)

Example:
Code:
=FILTER(A:T,(L:L="Packaging")*(R:R="Open"),"")

This will show ALL the "Open" order status' information for that work center. I just need the count. So that would be just one column count, not all the count for the columns displayed. CHOOSECOLS does that but not in VBA.

So basically, I just need to check each work center to figure out how open and closed orders each have? Thanks in advance.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
If you only want one column, use INDEX.
 
Upvote 0
Filter on column A only.
Excel Formula:
=COUNTA(FILTER(A:A,(L:L=C165)*(R:R=C168),""))
 
Upvote 0
Solution

Forum statistics

Threads
1,224,827
Messages
6,181,194
Members
453,021
Latest member
pingpong7117

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