View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default assigning value in macro


myValue = Application.COUNTIF(Range("B:B"),Range("B1"))

--

HTH

RP
(remove nothere from the email address if mailing direct)


"tina" wrote in message
...
Hi
When I want a value for of a formula for my macro I write the formula to

go
in a blank cell eg range("a1") ="= countif("b:b",b1)" then use myvalue =
range("a1") how do I assign countif to myvalue without doing this?
Thanks
Tina