excel - How to change range value to cell value? -


i have function :

=countif(data!$v$6:$v$1029;analyse_all!c7)

at moment need type "1029" (the last row cell value in column) manually. made function counts last row, , made write result cell.

how take vba result/cell value function?

thanks in advance!

  1. you can have vba write complete formula in stead of 1029:

    range("**coordinates of formula**").formula = "=countif(data!$v$6:$v$"& **originalvbaresult** & ";analyse_all!c7)"

  2. you can have offset within countif links cell write 1029 to:

    =countif(offset(data!$v$6;0;0;**cell 1029 in it**);analyse_all!c7)


Comments