Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Use multiple columns from a CSV to find an output

$
0
0

hoping someone would be able to help me. I know very basic powershell. I've got an excel table as closely shown below:

Name Position Shift Access1   Access2

A        X          W    AA1         AAA2

A        Y          W    AA3,AA4   AAA3

A        Z          V     AA5

B        X          W    BB1          BBB2,BBB3

B        Y           V     BB3,BB4  BBB5

B        Z           V     BB6         BBB7

I've got an input that captures Name, Position and Shift. What i need is to construct the script logic that if the combination of the ROW = Name+Position+Shift matches, then output the Access1 and Access2, notice some have 2 values in the Access1 and Access2. So for example, if input = A & Y & W then output should be AA3, AA4 and AAA3. Hope that makes sense.

Thanking you in advance.


Viewing all articles
Browse latest Browse all 6937

Trending Articles