Pookiemeister
Well-known Member
- Joined
- Jan 6, 2012
- Messages
- 626
- Office Version
- 365
- 2010
- Platform
- 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.
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:
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.
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.