View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Leo Heuser Leo Heuser is offline
external usenet poster
 
Posts: 266
Default VBA Formula to Count 2 criteria

"Jan" skrev i en meddelelse
...
Hello All,

I have the following formula that I would like to change to count 1 and 5
in
the specified range. How do I rewrite the code to accomplish that task?
Sorry, I don't know VBA code that well to accomplish rewriting it.

WIP=" & Application.CountIf(OR(Range("u3:u5000"), 5)

TIA
Jan



Hello Jan

Another option:

Dim WIP As Long

WIP = Evaluate("SUM(COUNTIF(U3:U5000,{1,5}))")


--
Best regards
Leo Heuser

Followup to newsgroup only please.