Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default check entire column value


Please provide me solution

for each value in column "G" if value = "y"
then check respective value in column "b" value = Null
then
print message its none

Thanks in Advance



*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default check entire column value

Sub naught()
Dim lr As Long, srcRng As Range, c As Range
lr = ActiveSheet.Cells(Rows.Count, 7).End(xlUp).Row
Set srcRng = ActiveSheet.Range("G2:G" & lr)
For Each c In srcRng
If Range("B" & c.Row) = "" Then
MsgBox "It's None " & Range("B" & c.Row).Address
End If
Next
End Sub


"preethi b" wrote in message
...

Please provide me solution

for each value in column "G" if value = "y"
then check respective value in column "b" value = Null
then
print message its none

Thanks in Advance



*** Sent via Developersdex http://www.developersdex.com ***



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default check entire column value

Missed part of the criteria. Use this one.

Sub naught()
Dim lr As Long, srcRng As Range, c As Range
lr = ActiveSheet.Cells(Rows.Count, 7).End(xlUp).Row
Set srcRng = ActiveSheet.Range("G2:G" & lr)
For Each c In srcRng
If LCase(c.Value) = "y" Then
If Range("B" & c.Row) = "" Then
MsgBox "It's None " & Range("B" & c.Row).Address
End If
End If
Next
End Sub


"preethi b" wrote in message
...

Please provide me solution

for each value in column "G" if value = "y"
then check respective value in column "b" value = Null
then
print message its none

Thanks in Advance



*** Sent via Developersdex http://www.developersdex.com ***



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default check entire column value

An other way with less loops:

Sub CheckOutNulls()
Dim rngNulls As Range
Dim rngCell As Range

On Error GoTo ErrorHandler
Set rngNulls = Range("B:B") _
.SpecialCells(xlCellTypeBlanks)

For Each rngCell In rngNulls.Cells
If rngCell.Offset(, 5) = "y" Then
MsgBox "It's none: " & rngCell.Address
'more code here
End If
Next rngCell
ExitProc:
Exit Sub
ErrorHandler:
MsgBox Err.Description, vbExclamation
Resume ExitProc
End Sub

Ο χρήστης "JLGWhiz" *γγραψε:

Missed part of the criteria. Use this one.

Sub naught()
Dim lr As Long, srcRng As Range, c As Range
lr = ActiveSheet.Cells(Rows.Count, 7).End(xlUp).Row
Set srcRng = ActiveSheet.Range("G2:G" & lr)
For Each c In srcRng
If LCase(c.Value) = "y" Then
If Range("B" & c.Row) = "" Then
MsgBox "It's None " & Range("B" & c.Row).Address
End If
End If
Next
End Sub


"preethi b" wrote in message
...

Please provide me solution

for each value in column "G" if value = "y"
then check respective value in column "b" value = Null
then
print message its none

Thanks in Advance



*** Sent via Developersdex http://www.developersdex.com ***




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default check entire column value


Thanks for the reply

I would like to print none only once for entire loop

after search completes

Thanks
Preethi



*** Sent via Developersdex http://www.developersdex.com ***


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default check entire column value

hi,

Any reply?



*** Sent via Developersdex http://www.developersdex.com ***
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
VBA how to check if entire row is selected? Jack Sons Excel Discussion (Misc queries) 6 April 23rd 23 09:00 PM
Excel 2007 Insert Check Boxes to an Entire Column Marilyn Excel Discussion (Misc queries) 3 May 5th 09 09:51 PM
Spell Check Entire WorkBook Missy Excel Discussion (Misc queries) 1 March 13th 08 04:20 PM
check first cell in row, move entire row to sheet of that name Billyshuvl Excel Worksheet Functions 1 September 27th 07 02:07 PM
how can I check the value 1 cell against the values of entire row Danbmarine Excel Discussion (Misc queries) 5 December 7th 05 10:25 PM


All times are GMT +1. The time now is 08:50 PM.

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

About Us

"It's about Microsoft Excel"