Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checking cells contain a value
I need to check that when i leave cell 7 in each row that either cell 6 or 7
contain a value. If they neither cell contain any values i want to display a warning message. How can I do this? Andy |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checking cells contain a value
give me more information. Not sure if you arre coding in VBA or working with
functions on an excel spreadsheet. In either case you need a macro. If you are working in an excel spreadsheet then you need to writte a macro call Sum Worksheet_change(). If you arre already in VBA there are some test functions you can use like isnull(cell) or isempty(cell). "ingalla" wrote: I need to check that when i leave cell 7 in each row that either cell 6 or 7 contain a value. If they neither cell contain any values i want to display a warning message. How can I do this? Andy |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checking cells contain a value
I am working with functions on the worksheet
"Joel" wrote: give me more information. Not sure if you arre coding in VBA or working with functions on an excel spreadsheet. In either case you need a macro. If you are working in an excel spreadsheet then you need to writte a macro call Sum Worksheet_change(). If you arre already in VBA there are some test functions you can use like isnull(cell) or isempty(cell). "ingalla" wrote: I need to check that when i leave cell 7 in each row that either cell 6 or 7 contain a value. If they neither cell contain any values i want to display a warning message. How can I do this? Andy |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checking cells contain a value
See if this is what you want. On the tab at the bottom of the worksheet
press right mouse button and select view code. Put this code into the VBA editor. then go back to worksheet and see if it works properly Private Sub Worksheet_change(ByVal Target As Range) If (ActiveSheet.Cells(Target.Row, 6) = "") And _ (ActiveSheet.Cells(Target.Row, 7) = "") Then MsgBox ("Warning: Columns F & G are both empty") End If End Sub "Joel" wrote: give me more information. Not sure if you arre coding in VBA or working with functions on an excel spreadsheet. In either case you need a macro. If you are working in an excel spreadsheet then you need to writte a macro call Sum Worksheet_change(). If you arre already in VBA there are some test functions you can use like isnull(cell) or isempty(cell). "ingalla" wrote: I need to check that when i leave cell 7 in each row that either cell 6 or 7 contain a value. If they neither cell contain any values i want to display a warning message. How can I do this? Andy |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Checking cells contain a value
Have you thought about just using a formula in an adjacent cell:
Kind of like: =if(counta(a2:g2)=0,"",if(counta(f2:g2)0,"","Put something in F or G")) Use a nice big red bold format. ingalla wrote: I need to check that when i leave cell 7 in each row that either cell 6 or 7 contain a value. If they neither cell contain any values i want to display a warning message. How can I do this? Andy -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
checking two different cells | Excel Worksheet Functions | |||
Checking range of cells for entry then checking for total | Excel Programming | |||
Checking the Cells in Sheet1 with Cells in Sheet2 and replace | Excel Worksheet Functions | |||
checking blank cells | Excel Programming | |||
copying cells by checking color of the cells | Excel Programming |