Carl Clements
Board Regular
- Joined
- Jun 13, 2008
- Messages
- 95
Hi,
Is it possible to code a formula such as a SUMIF in VBA to look in a column from cell T2 until the row number previously counted, rather than selecting the whole column?
The reason I'm not selecting the column only is because I have merged cells in row 1 above
I currently have the formula below:
SUMIF(Database!S2:S63,'LODH OTC Recon'!C9,Database!Y2:Y63)
but would like to replace the S63 and Y63 with number of rows counted and stored as the variable 'CountROWS'
I thought the following code would work but unfortunately not
SUMIF(Database!T2:T & CountROWS,'LODH OTC Recon'!RC[-5],Database!T2:T & CountROWS))
Thanks,
Carl
Is it possible to code a formula such as a SUMIF in VBA to look in a column from cell T2 until the row number previously counted, rather than selecting the whole column?
The reason I'm not selecting the column only is because I have merged cells in row 1 above
I currently have the formula below:
SUMIF(Database!S2:S63,'LODH OTC Recon'!C9,Database!Y2:Y63)
but would like to replace the S63 and Y63 with number of rows counted and stored as the variable 'CountROWS'
I thought the following code would work but unfortunately not
SUMIF(Database!T2:T & CountROWS,'LODH OTC Recon'!RC[-5],Database!T2:T & CountROWS))
Thanks,
Carl