View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Ivan Raiminius Ivan Raiminius is offline
external usenet poster
 
Posts: 258
Default Change Formula with Macro

Hi Chris,

maybe better solution:

supposing, that you will store your two numbers in a1 (=3) and b1 (=4),
you can re-write the formula to be:
=DCOUNTA(Query!$A$1:$C$50319,Query!$A$1,indirect(" Calculations!$DM$"&a1&":$DP$"&b1))

Regards,
Ivan