Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find cell and determine value in current row
Hi
I am trying to write some code that should be pretty easy to do; however I am suffering from a mental block. I am trying to validate that a certain cell is completed if another cell in that same row has data. I am prompting for this validation whenever the user clicks outside of the specified range b20:f39. I am having trouble with 2 things: 1 Finding the corresponding cell in Column F of the Same row 2 Determining if that Cell has data (I had problems with data mismatch errors). Below is part of the code I have written. Any help would be greatly appreciated. If Intersect(Target, Range("b20:f39")) Is Nothing Then Dim c As Variant For Each c In Worksheets("Expense Report").Range("b20:b39").Cells If c < "" Then Need to find cell in column f of same row Need to determine if data has been entered in that cell End If Next End If |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find cell and determine value in current row
1)
cells(c.row,"F") 2) If isempty( cells(c.row,"F") ) Then ' do something End if "Kathy - Lovullo" wrote: Hi I am trying to write some code that should be pretty easy to do; however I am suffering from a mental block. I am trying to validate that a certain cell is completed if another cell in that same row has data. I am prompting for this validation whenever the user clicks outside of the specified range b20:f39. I am having trouble with 2 things: 1 Finding the corresponding cell in Column F of the Same row 2 Determining if that Cell has data (I had problems with data mismatch errors). Below is part of the code I have written. Any help would be greatly appreciated. If Intersect(Target, Range("b20:f39")) Is Nothing Then Dim c As Variant For Each c In Worksheets("Expense Report").Range("b20:b39").Cells If c < "" Then Need to find cell in column f of same row Need to determine if data has been entered in that cell End If Next End If |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I find a match for three variables to determine the result? | Excel Worksheet Functions | |||
Function to determine current cursor position? | Excel Worksheet Functions | |||
Formula to determine number of current records by week | Excel Worksheet Functions | |||
Determine current default fill color | Excel Programming | |||
FIND CURRENT DIRECTORY | Excel Programming |