Ananthak275
Board Regular
- Joined
- Aug 22, 2020
- Messages
- 128
- Office Version
- 2013
- Platform
- Windows
- MacOS
Hi,
I have this dataset which has the following columns Location, Salary, Trees, Apple, Cost, Jack. I'm looking to be able to;
Example of dataset:
I have this dataset which has the following columns Location, Salary, Trees, Apple, Cost, Jack. I'm looking to be able to;
- Go to column "Salary".
- Filter for values = 2 in Salary Column
- Then extract only values from Location, Salary, Apple & Cost. NOT JACK and TREEs
Sub GoToColumn()
Set CWS = ActiveSheet
AColNum = Application.WorksheetFunction.Match("Salary", CWS.Rows(1), 0)
Cells(1, AColNum).Select
Example of dataset:
Location | Salary | Trees | Apple | Cost | Jack |
Washington | 1 | 0.78 | No | 0.99 | 0.87 |
Washington | 1 | 0.60 | No | 0.42 | 0.51 |
Washington | 1 | 0.17 | No | 0.81 | 0.86 |
Washington | 1 | 0.68 | No | 0.58 | 0.64 |
Washington | 1 | 0.34 | No | 0.19 | 0.31 |
Washington | 1 | 0.72 | No | 0.87 | 0.48 |
New York | 2 | 0.59 | Yes | 0.24 | 0.63 |
New York | 2 | 0.79 | Yes | 0.87 | 0.96 |
New York | 2 | 0.08 | Yes | 0.46 | 0.83 |
New York | 2 | 0.66 | Yes | 0.20 | 0.30 |
Washington | 3 | 0.45 | No | 0.35 | 0.12 |
Washington | 3 | 0.34 | No | 0.88 | 0.87 |
Washington | 4 | 0.02 | No | 0.57 | 0.41 |
Washington | 4 | 0.37 | No | 0.21 | 0.23 |