#1   Report Post  
S1
 
Posts: n/a
Default empty variable range

hi all,
I posted this yesterday but i failed to mention something
and the advise i got is not working. my fault.
how can i tell if a range is empty.
i have a do loop that i want to check a range as it goes
down the sheet. if the range is empty then color it else
don't. the range is assigned to a variable as it moves
down the sheet.
what i am using now is
application.counta("qpa1")
this counts 1 regardless of what is in the range.
anyone have hints, suggestions, directions?
any help would be appreciated.
S1
  #2   Report Post  
Jim May
 
Posts: n/a
Default

thank you Bob
S1
-----Original Message-----
Maybe

If Application.CountA(Range("J12:X12")) 0 Then
...

--

HTH

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


"S1" wrote in

message
...
hi all,
what would be the vb code to chech a range to see if
anything (data) was there. say range j12:x12.

thank you in advance
S1



.

"S1" wrote in message
...
hi all,
I posted this yesterday but i failed to mention something
and the advise i got is not working. my fault.
how can i tell if a range is empty.
i have a do loop that i want to check a range as it goes
down the sheet. if the range is empty then color it else
don't. the range is assigned to a variable as it moves
down the sheet.
what i am using now is
application.counta("qpa1")
this counts 1 regardless of what is in the range.
anyone have hints, suggestions, directions?
any help would be appreciated.
S1



  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

There must be something in the range if it is 1.

--

HTH

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


"S1" wrote in message
...
hi all,
I posted this yesterday but i failed to mention something
and the advise i got is not working. my fault.
how can i tell if a range is empty.
i have a do loop that i want to check a range as it goes
down the sheet. if the range is empty then color it else
don't. the range is assigned to a variable as it moves
down the sheet.
what i am using now is
application.counta("qpa1")
this counts 1 regardless of what is in the range.
anyone have hints, suggestions, directions?
any help would be appreciated.
S1



  #4   Report Post  
 
Posts: n/a
Default

hi bob
I high lighted the range and deleted. but even in the
other ranges(as it moves down the sheet) it will return 1
even if there are 3,4 or 5 number in the range. it returns
1 regardless.


-----Original Message-----
There must be something in the range if it is 1.

--

HTH

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


"S1" wrote in

message
...
hi all,
I posted this yesterday but i failed to mention

something
and the advise i got is not working. my fault.
how can i tell if a range is empty.
i have a do loop that i want to check a range as it goes
down the sheet. if the range is empty then color it else
don't. the range is assigned to a variable as it moves
down the sheet.
what i am using now is
application.counta("qpa1")
this counts 1 regardless of what is in the range.
anyone have hints, suggestions, directions?
any help would be appreciated.
S1



.

  #5   Report Post  
 
Posts: n/a
Default

yes yes, i know. i say i posted yesterday.

-----Original Message-----
thank you Bob
S1
-----Original Message-----
Maybe

If Application.CountA(Range("J12:X12")) 0 Then
...

--

HTH

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


"S1" wrote in

message
...
hi all,
what would be the vb code to chech a range to see if
anything (data) was there. say range j12:x12.

thank you in advance
S1



.

"S1" wrote in

message
...
hi all,
I posted this yesterday but i failed to mention

something
and the advise i got is not working. my fault.
how can i tell if a range is empty.
i have a do loop that i want to check a range as it goes
down the sheet. if the range is empty then color it else
don't. the range is assigned to a variable as it moves
down the sheet.
what i am using now is
application.counta("qpa1")
this counts 1 regardless of what is in the range.
anyone have hints, suggestions, directions?
any help would be appreciated.
S1



.



  #6   Report Post  
 
Posts: n/a
Default

hi,
i did some research.
Counta is for text/other
count is for numbers
however changing to count and formating all the qpa's to
number does no good either.
aplication.count("qpa1") now returns zero regarless of
what is in the range.

-----Original Message-----
hi bob
I high lighted the range and deleted. but even in the
other ranges(as it moves down the sheet) it will return 1
even if there are 3,4 or 5 number in the range. it

returns
1 regardless.


-----Original Message-----
There must be something in the range if it is 1.

--

HTH

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


"S1" wrote in

message
...
hi all,
I posted this yesterday but i failed to mention

something
and the advise i got is not working. my fault.
how can i tell if a range is empty.
i have a do loop that i want to check a range as it

goes
down the sheet. if the range is empty then color it

else
don't. the range is assigned to a variable as it moves
down the sheet.
what i am using now is
application.counta("qpa1")
this counts 1 regardless of what is in the range.
anyone have hints, suggestions, directions?
any help would be appreciated.
S1



.

.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing a range name as an argument to the Index Function Michael Sharpe Excel Discussion (Misc queries) 3 September 5th 12 01:33 PM
CountIF cells are not empty Wayne Excel Discussion (Misc queries) 3 January 6th 05 04:44 PM
named range refers to: in a chart Spencer Hutton Excel Discussion (Misc queries) 1 December 14th 04 10:15 PM
range name Pedro Excel Worksheet Functions 0 November 9th 04 06:22 PM
variable range countif JK Excel Worksheet Functions 3 November 3rd 04 07:50 AM


All times are GMT +1. The time now is 06:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"