PDA

View Full Version : Adding Formula in VBA ...Need help



suyogpat
10-31-2017, 12:36 AM
Hello All,

It might be a stupid question, I have below formula which I want to add in my VBA macro is not accepting the formula. What I need is macro to calculate this formula.

my excel formula is - =IF(SUMPRODUCT(--(D$3:D$7<>""),--ISNUMBER(SEARCH(D$3:D$7,A4))),"exclude","")

Anybody can help me to write this formula in VBA?I tried the recording function but problem is, its possible that I have to change the range every week in this formula. so recoding formula option wont work here. if anyone can solve, this will be a big help for me..

Thanks in advance for your help and time.