Formula error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
While trying to run a macro containing the following code-
Range("N1").Formula = CountIf("K" & x, "J" & z - 1, "yes") / CountIf("L" &
x, "L" & z - 1, "yes")

error appears saying sub ar function not defined
can anyone please help me in this...

Thanks in advance for your posts

jithu
 
try:

Range("N1").Formula = "=CountIf(K" & x & ":J" & z - 1 &
",""yes"")/CountIf(L" & x & ":L" & z - 1 & ",""yes"")"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top