I'm trying to use powershell to create pie charts in excel. I can highlight ranges with .Select() or .Activate() but I can't simultaneously select two separate ranges. I need to select them simultaneously so that the pie chart has the correct labels. Can't find any guidance online so any help would be greatly appreciated.
$headers = $ws.Cells.Item(1,1).EntireRow
$headers.Activate()
$ws.Range("A3:ZZ3").Activate()