Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check for wrong cell content
I wish to check a cell to be sure it has a formula in it. If the cell has a
zero or number in it then I want to copy a cell with the correct formula in to it. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Check for wrong cell content
Hi OldJay,
Try something like: '========== Public Sub Tester() Dim WB As Workbook Dim SH As Worksheet Dim Rng As Range Dim Rng2 As Range Set WB = Workbooks("myBook.xls") '<<==== CHANGE Set SH = WB.Sheets("Sheet2") '<<==== CHANGE With SH Set Rng = .Range("A1") '<<==== CHANGE Set Rng2 = .Range("C1") '<<==== CHANGE End With If Not Rng.HasFormula Then Rng2.Copy Destination:=Rng End If End Sub '<<========== --- Regards. Norman "Oldjay" wrote in message ... I wish to check a cell to be sure it has a formula in it. If the cell has a zero or number in it then I want to copy a cell with the correct formula in to it. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Check if content in cell is an integer | New Users to Excel | |||
Check if content in cell is an integer | New Users to Excel | |||
Check if cell content changed | Excel Programming | |||
Check Cell Content before continuing... | Excel Programming | |||
VBA cell content check | Excel Programming |