ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   If Empty run Macro (https://www.excelbanter.com/excel-programming/420973-if-empty-run-macro.html)

Miree

If Empty run Macro
 
I want to write code to say that if range G5:H5 is empty run macro
moveresults, if it is not empty run macro moveresults2.

Thank You

Mike H

If Empty run Macro
 
Hi,

Maybe this

Sub Sonic()
Set myrange = Range("G5:H5")
If Application.CountA(myrange) Then
moveresults2
Else
moveresults
End If
End Sub

"Miree" wrote:

I want to write code to say that if range G5:H5 is empty run macro
moveresults, if it is not empty run macro moveresults2.

Thank You



All times are GMT +1. The time now is 12:27 PM.

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