Data in array, clear all rows if column values do not equal x and y

JackDanIce

Well-known Member
Joined
Feb 3, 2010
Messages
9,922
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have data in an array but need a subset of this data where Column 5 <> "Setup" or Column 5 <>"Jack"

Closest code found but unable to adjust is:
Code:
Function SubSet(ByRef WholeSet As Variant) As Variant

SubSet = Application.Index(WholeSet, "" <> "" & Array("Setup", "Jack"), 5)

End Function
Gives run-time error '13' Type mismatch, I'm guessing my 2nd argument is incorrect.

Can anyone suggest please?

TIA,
Jack
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I'm in a similar boat, I have 1 column I want to filter on a string another column i want to filter on blanks.

Keep column City/Network matching XYZ string (all rows)
delete all rows that are blank in column Group

Make 1 or 2 new arrays from the current array I have floating out in memory.
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

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