msgbox

M

muddan madhu

Hi All,

I have 10 columns and i am running macro , Macro part is ok at the end
i need to add some msgbox.

how should i do ....I need msgbox to display result using counta
formula for a Range ("B:B").

Suppose if range("B:B") has 100 values or Text then it should display
"you have 100 to work"

Similarly is it possible to add countif function in msgbox -
countif(Range("A:D"),"ok")

Thanks in advance
 
B

Bernard Liengme

Try something like

myCount = application.COUNTA("B1:B1000")
Msgbox "You have " & myCount & " goodies"

best wishes
 
M

muddan madhu

it is giving count as 1 ......

I changed mycount = application.counta(range("B1:B100"))

I got the result......


Thanks Bernard.....

What about using countif in msgbox
 

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

Top