Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default Test Message

Hello All,

Looking for code that does the following.
Reviews cells I4,L4 and O4 If any of these cells are <0 andif any of the
same cells are 0 then Msgbox "Site Balance" else do nothing. Then next row
and keep doing it until the end of page.

Thanks in advance!!
Aaron
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Test Message

iLastRow = Cell(Rows.Count,"I").End(xlUp).Row
For i = 1 To iLastRow
If Cells(i,"I").Value <0 or Cells(i,"L").Value < 0 Or _
Cells(i,"M") < 0 Then
MsgBox "Site balance on rfow " & i
End If
Next i

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Aaron" wrote in message
...
Hello All,

Looking for code that does the following.
Reviews cells I4,L4 and O4 If any of these cells are <0 andif any of the
same cells are 0 then Msgbox "Site Balance" else do nothing. Then next

row
and keep doing it until the end of page.

Thanks in advance!!
Aaron



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 287
Default Test Message

This would not work. I only need the msgbox if there are both positive and
Negative numbers in the three cells.

"Bob Phillips" wrote:

iLastRow = Cell(Rows.Count,"I").End(xlUp).Row
For i = 1 To iLastRow
If Cells(i,"I").Value <0 or Cells(i,"L").Value < 0 Or _
Cells(i,"M") < 0 Then
MsgBox "Site balance on rfow " & i
End If
Next i

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Aaron" wrote in message
...
Hello All,

Looking for code that does the following.
Reviews cells I4,L4 and O4 If any of these cells are <0 andif any of the
same cells are 0 then Msgbox "Site Balance" else do nothing. Then next

row
and keep doing it until the end of page.

Thanks in advance!!
Aaron




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Test Message

iLastRow = Cell(Rows.Count,"I").End(xlUp).Row
For i = 1 To iLastRow
If (Cells(i,"I").Value <0 Or Cells(i,"L").Value < 0 Or _
Cells(i,"M") < 0) And _
(Cells(i,"I").Value 0 Or Cells(i,"L").Value 0 Or _
Cells(i,"M") 0) Then
MsgBox "Site balance on rfow " & i
End If
Next i


--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Bob Phillips" wrote in message
...
iLastRow = Cell(Rows.Count,"I").End(xlUp).Row
For i = 1 To iLastRow
If Cells(i,"I").Value <0 or Cells(i,"L").Value < 0 Or _
Cells(i,"M") < 0 Then
MsgBox "Site balance on rfow " & i
End If
Next i

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Aaron" wrote in message
...
Hello All,

Looking for code that does the following.
Reviews cells I4,L4 and O4 If any of these cells are <0 andif any of the
same cells are 0 then Msgbox "Site Balance" else do nothing. Then next

row
and keep doing it until the end of page.

Thanks in advance!!
Aaron





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Error Message as test Criteria Taru Excel Worksheet Functions 2 June 16th 06 05:49 PM
test message Todd Huttenstine Excel Programming 0 January 31st 06 04:54 PM
Just a test message to be deleted Bosko Excel Worksheet Functions 1 November 3rd 05 10:06 AM
Test - Ignore this message Yza Excel Programming 1 February 21st 05 03:09 PM
Test message Neil[_11_] Excel Programming 0 December 31st 03 07:44 PM


All times are GMT +1. The time now is 10:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"