Hi All,
Just made a quick custom function that lumps together a few countries using the following:
then adding up the country1 and country2 values and returning them.
I'm well aware the error comes from the fact that in this case there's no data for Ireland but is there a way to catch the #value error from ireland in the macro?
Thanks in advance
Just made a quick custom function that lumps together a few countries using the following:
Code:
Case "UK/Ireland"
Country1 = Worksheets("Spend + pivot").Cells(3, 18).PivotTable.GetPivotData _
("Amin$", "Country", "UK", "C", C)
Country2 = Worksheets("Spend + pivot").Cells(3, 18).PivotTable.GetPivotData _
("Amin$", "Country", "Ireland", "C", C)
then adding up the country1 and country2 values and returning them.
I'm well aware the error comes from the fact that in this case there's no data for Ireland but is there a way to catch the #value error from ireland in the macro?
Thanks in advance