![]() |
null value cell
Hi All,
Im attempting to create code to evaluating cell content. However, I am having a little trouble creating code to recognize cells having no value or null cell. Heres the code. Sub testcode() Sheets("DISPLAY").Select If Range("O9").Value < Null Then If Range("O9").Value < "FirstBoxDisputesRelated" Then DropDownBox = Range("O9").Text ActiveSheet.Shapes(DropDownBox).Select Selection.Cut End If End If End Sub What changes are required to recognize cell O9 when the value does not equal null? Thanks Paul |
null value cell
Instead of testing for Null, test for an empty string. E.g.,
If Range("O9").Value < "" Then -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Paul" wrote in message ... Hi All, I'm attempting to create code to evaluating cell content. However, I am having a little trouble creating code to recognize cells having no value or null cell. Here's the code. Sub testcode() Sheets("DISPLAY").Select If Range("O9").Value < Null Then If Range("O9").Value < "FirstBoxDisputesRelated" Then DropDownBox = Range("O9").Text ActiveSheet.Shapes(DropDownBox).Select Selection.Cut End If End If End Sub What changes are required to recognize cell O9 when the value does not equal null? Thanks Paul |
null value cell
Thank You!!!!
"Chip Pearson" wrote: Instead of testing for Null, test for an empty string. E.g., If Range("O9").Value < "" Then -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Paul" wrote in message ... Hi All, I'm attempting to create code to evaluating cell content. However, I am having a little trouble creating code to recognize cells having no value or null cell. Here's the code. Sub testcode() Sheets("DISPLAY").Select If Range("O9").Value < Null Then If Range("O9").Value < "FirstBoxDisputesRelated" Then DropDownBox = Range("O9").Text ActiveSheet.Shapes(DropDownBox).Select Selection.Cut End If End If End Sub What changes are required to recognize cell O9 when the value does not equal null? Thanks Paul |
All times are GMT +1. The time now is 03:00 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com