I am trying to iterate through a filtered table, and print the values of 3 columns. I want them to print with each row as a set (supplier, plant, price). This is the code I have so far.
For Each Row In Union(Range("TblRawData[Supplier]"), Range("TblRawData[plant]"), Range("TblRawData[price]")).Rows
If Row.EntireRow.Hidden = False Then
Debug.Print Row.Value
End If
Next Row
This code prints all the suppliers, then all the plants, then all the prices. Instead of each row being a set.
Code Results: Desired Result:
supplier1 supplier1, plant1, $1.50
supplier2 supplier2, plant2, $2.00
supplier3 supplier3, plant3, $3.00
plant1
plant2
plant3
$1.50
$2.00
$3.00