ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   isblank macro (https://www.excelbanter.com/excel-programming/405703-isblank-macro.html)

Carole O

isblank macro
 
I paste a file containing the names of departments and data regarding them
into a worksheet. I run a macro to sort and move each department's data into
their own worksheets. Some departments may not have data moved to their
worksheet (this is a good thing). If their worksheet (i.e. C2) is blank, I
would like the macro to say "Congratulations! You do not have any Negative
reports for this period". I'm having trouble developing the IF statement.

TIA,
Carole O

FSt1

isblank macro
 
hi
lot of ways to do this. heres one
Sheets("sheet2").Activate
If Range("A1") = "" Then
Range("A1").Value = "Congratulations! You do not have any Negative
reports for this period."
End If

regards
FSt1

"Carole O" wrote:

I paste a file containing the names of departments and data regarding them
into a worksheet. I run a macro to sort and move each department's data into
their own worksheets. Some departments may not have data moved to their
worksheet (this is a good thing). If their worksheet (i.e. C2) is blank, I
would like the macro to say "Congratulations! You do not have any Negative
reports for this period". I'm having trouble developing the IF statement.

TIA,
Carole O


Carole O

isblank macro
 
Thank you so much! That is exactly what I wanted to do!

Carole O

"Carole O" wrote:

I paste a file containing the names of departments and data regarding them
into a worksheet. I run a macro to sort and move each department's data into
their own worksheets. Some departments may not have data moved to their
worksheet (this is a good thing). If their worksheet (i.e. C2) is blank, I
would like the macro to say "Congratulations! You do not have any Negative
reports for this period". I'm having trouble developing the IF statement.

TIA,
Carole O



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

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