PC Review


Reply
 
 
RobcPettit
Guest
Posts: n/a
 
      17th Nov 2006
Hi im using T = Evaluate("COUNTIF(g15:g27," & """ & " < " & 6 &
"""")") to count how many values are smaller than 6. There are 9 such
values that are smaller, but this formula returns false. Any Ideas. Im
need to use this in vba. Ican get the correct answer in the worksheet
using the formula.
Regards Robert

 
Reply With Quote
 
 
 
 
RobcPettit
Guest
Posts: n/a
 
      17th Nov 2006

Sorry, think Ive got it.
T = Application.WorksheetFunction.CountIf(Range("g15:g27"), "<6").
Regards Robert

 
Reply With Quote
 
RobcPettit
Guest
Posts: n/a
 
      17th Nov 2006
ok T = Application.WorksheetFunction.CountIf(Range("g15:g27"), "<6")
works, any ideas how i can use a variable in place of "<6". Ive tried T
= Application.WorksheetFunction.CountIf(Range("g15:g27"), < point), but
get an error. Also I want to replace the range with selected cells.
T = Application.WorksheetFunction.CountIf(Active.cells,< point).
Regards Robert

 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      17th Nov 2006
T = Application.CountIf(Range("G15:G27"), "<" & myVar)

T= Application.CountIf(Selection, "<" & myVar)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"RobcPettit" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> ok T = Application.WorksheetFunction.CountIf(Range("g15:g27"), "<6")
> works, any ideas how i can use a variable in place of "<6". Ive tried T
> = Application.WorksheetFunction.CountIf(Range("g15:g27"), < point), but
> get an error. Also I want to replace the range with selected cells.
> T = Application.WorksheetFunction.CountIf(Active.cells,< point).
> Regards Robert
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:38 AM.