Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try the Range property Text:
if len(activecell.text) = 0 then...end if 'cell has empty string if val(activecell.text)= 0 then...end if 'cell has zero numerical value "Lenny Amore" wrote in message ... Hi All, I have a question that I hope someone can help me with. I wrote some code that looks at a workbook for a 3 letter month (example Jan Feb Mar, etc) and then moves one column over. So for example when it finds the month of Jul it moves to the value column. OK, I got that part working...Now I want to look into that cell and find out if there is a value there. The workbook is linked to another so that when other people enter data it is inserted into this workbook. Problem is that if they don't insert their data I can't go any further so I want my code to throw an error and say this cell is empty. The problem is, it is looking at the formula in the cell and therefore says the cell is not empty. I hope this isn't to confusing. Below is my code:'Find the Cell corresponding to current month Range("A1").Select Cells.Find(What:=str_month, After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _ , SearchFormat:=False).Activate ActiveCell.Offset(0, 1).Select If Not IsNull(ActiveCell.Value) Then 'Keep going ' Else 'stop Generate error message MsgBox ("There is no FTVR Data") End If I would appreciate any help on this. Thanks, Lenny |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find Formula | Excel Worksheet Functions | |||
formula to find a value | Excel Worksheet Functions | |||
Need to find the right formula | Excel Discussion (Misc queries) | |||
Need to find a formula | Excel Worksheet Functions | |||
Lookup Formula - but have a formula if it can't find/match a value | Excel Worksheet Functions |