I have a sumifs formula in sheet 2 where the sum range and criteria ranges are in sheet1. The criteria are on sheet 2. When I initially input the formula on sheet 2, it works fine, however, when I run a certain macro, the formula messes up.
The purpose of the macro is to format things correctly on sheet1 when I import new data. So, I import new data on sheet1, execute the macro, the data is formatted correctly so the referenced material in the sumifs formula can refer to the correct data.
Not sure why its giving me an error.
It looks like this originally = sumifs(Sheet1!G:G,Sheet1!,Indirect("Sheet2!A1"),Sheet1!A:A,Indirect("Sheet2!A2"))
The columns highlighted in red are showing the #REF once the macro is run. The reason why I put the entire column as the reference area is because the data I import varies on how far down it is.
Any suggestions?
The purpose of the macro is to format things correctly on sheet1 when I import new data. So, I import new data on sheet1, execute the macro, the data is formatted correctly so the referenced material in the sumifs formula can refer to the correct data.
Not sure why its giving me an error.
It looks like this originally = sumifs(Sheet1!G:G,Sheet1!,Indirect("Sheet2!A1"),Sheet1!A:A,Indirect("Sheet2!A2"))
The columns highlighted in red are showing the #REF once the macro is run. The reason why I put the entire column as the reference area is because the data I import varies on how far down it is.
Any suggestions?