PC Review


Reply
Thread Tools Rate Thread

Checking cells contain a value

 
 
=?Utf-8?B?aW5nYWxsYQ==?=
Guest
Posts: n/a
 
      7th Mar 2007
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Sm9lbA==?=
Guest
Posts: n/a
 
      7th Mar 2007
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

 
Reply With Quote
 
=?Utf-8?B?aW5nYWxsYQ==?=
Guest
Posts: n/a
 
      7th Mar 2007
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

 
Reply With Quote
 
=?Utf-8?B?Sm9lbA==?=
Guest
Posts: n/a
 
      7th Mar 2007
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

 
Reply With Quote
 
Dave Peterson
Guest
Posts: n/a
 
      7th Mar 2007
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checking two cells =?Utf-8?B?VGFueWE=?= Microsoft Excel Programming 1 4th Jul 2007 04:04 AM
Checking range of cells for entry then checking for total =?Utf-8?B?QmFyYiBSZWluaGFyZHQ=?= Microsoft Excel Programming 1 13th Oct 2006 02:47 PM
Checking the Cells in Sheet1 with Cells in Sheet2 and replace =?Utf-8?B?Q2hlY2tpbmcgdGhlIGNlbGxzIGluIFNoZWV0MSB3 Microsoft Excel Worksheet Functions 2 19th Aug 2006 09:29 AM
Checking the Cells in Sheet1 with Cells in Sheet2 and replace =?Utf-8?B?Q2hlY2tpbmcgdGhlIGNlbGxzIGluIFNoZWV0MSB3 Microsoft Excel Worksheet Functions 0 19th Aug 2006 07:33 AM
copying cells by checking color of the cells JJJ010101 Microsoft Excel Programming 1 24th Jan 2006 06:42 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:15 PM.