ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Check range of cells for non-null values (https://www.excelbanter.com/excel-programming/402690-check-range-cells-non-null-values.html)

Dale Fye

Check range of cells for non-null values
 
I need to create a report (worksheet) that is populated with references to
values that are missing in a "data sheet". But rather than enter one row for
each missing value, if all of the cells from C1:M1 (just an example) are
empty, I want to do enter just a single row in my report worksheet.

I can write a function to loop through the range of cells, but wanted to
know if there is an easier way, somesort of WorksheetFunction that will do
this, given that some of the data that should be in those cells is text, and
some is numeric.

Thanks.
--
Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.


joel

Check range of cells for non-null values
 
if worksheetfunction.counta(Range("C1:M1")) = 0 then
'enter code if all cells are empty
end if


end if

"Dale Fye" wrote:

I need to create a report (worksheet) that is populated with references to
values that are missing in a "data sheet". But rather than enter one row for
each missing value, if all of the cells from C1:M1 (just an example) are
empty, I want to do enter just a single row in my report worksheet.

I can write a function to loop through the range of cells, but wanted to
know if there is an easier way, somesort of WorksheetFunction that will do
this, given that some of the data that should be in those cells is text, and
some is numeric.

Thanks.
--
Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com