How to use operator in cells

  • Thread starter Thread starter hittingtime
  • Start date Start date
H

hittingtime

Hi, All:
I have A1="9" B1="'>0" B2="'=1". B2="'<1"........

How can I reference them in VBA, for example, I want to check if A1>0
or not. I want to use A1 and B1 directly. How can I do that in VBA
I tried

if cells(1, 1) & cells(1, 2) then
..........
end if


It doesn't work. Any one knows how to handle this? Thanks.
 
probably need a little more information as to what you're trying to accomplish:

sub test
dim ws as worksheet
set ws = worksheets("Sheet1")
if ws.range("A1") > 0 then
'do something
end if
end sub
 
What I want to accomplish is that I want to summarize the data in the
sheets "data" under some conditions?

For example I want to know how many customers have balance below 4000
and how many of them have balance above 5000, etc

So I have a set of conditions in column B in "summary" sheet, <40,

in column C, another variable >0, >1 =0 etc

...........

In column O, is the sum of customers satisfy my conditions in column B
to P.

How can I do this? Thanks.
 
What I want to accomplish is that I want to summarize the data in the
sheets "data" under some conditions?

For example I want to know how many customers have balance below 4000
and how many of them have balance above 5000, etc

So I have a set of conditions in column B in "summary" sheet, < 4000,

in column C, another variable =0, =1 etc

...........

In column O, is the sum of customers satisfy my conditions in column B
to P.

How can I do this? Thanks.
 

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