N
navin
Hello All,
In my excel sheet, i need to apply sumproduct formula but the problem
is that the column which contains the data changes every month. Eg. if
in Jan, Column A contains the data then next month it will shift to
column B.
To do this, in a sheet (same workbook), i entered the column names,
which contains the data and tried refrencing them with indirect
formula.
A1=B (Column which contains the data to check)
A2=120 (total rows)
A3=Sheet1 (Sheet which contains the data)
A4=C (Column which contains data to sum)
Below is the formula which i am using:
=SUMPRODUCT(($A$3&"!$"&INDIRECT(CELL("address",$A$1))&"$2:$"&INDIRECT
(CELL("address",$B$1))&"$"& $A$2="INCLUDE"))*$A$3&"!$"&INDIRECT(CELL
("address",$A$4))&"$2:$"&INDIRECT(CELL("address",$A$4))&"$"&$A$2)
above formula checks the first condition but when it comes to summing
up the column it gives #value error.
Please help to get this formula working. If there are any suggestions
to do this in a different way, please let me know.
Thanks in advance for help.
Navin
In my excel sheet, i need to apply sumproduct formula but the problem
is that the column which contains the data changes every month. Eg. if
in Jan, Column A contains the data then next month it will shift to
column B.
To do this, in a sheet (same workbook), i entered the column names,
which contains the data and tried refrencing them with indirect
formula.
A1=B (Column which contains the data to check)
A2=120 (total rows)
A3=Sheet1 (Sheet which contains the data)
A4=C (Column which contains data to sum)
Below is the formula which i am using:
=SUMPRODUCT(($A$3&"!$"&INDIRECT(CELL("address",$A$1))&"$2:$"&INDIRECT
(CELL("address",$B$1))&"$"& $A$2="INCLUDE"))*$A$3&"!$"&INDIRECT(CELL
("address",$A$4))&"$2:$"&INDIRECT(CELL("address",$A$4))&"$"&$A$2)
above formula checks the first condition but when it comes to summing
up the column it gives #value error.
Please help to get this formula working. If there are any suggestions
to do this in a different way, please let me know.
Thanks in advance for help.
Navin