PC Review


Reply
Thread Tools Rate Thread

Check for wrong cell content

 
 
Oldjay
Guest
Posts: n/a
 
      3rd May 2008
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 With Quote
 
 
 
 
Norman Jones
Guest
Posts: n/a
 
      3rd May 2008
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" <(E-Mail Removed)> wrote in message
news:C938192A-AA20-46F8-8908-(E-Mail Removed)...
>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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Check if content in cell is an integer prem Microsoft Excel New Users 6 1st May 2008 01:54 PM
RE: Check if content in cell is an integer Mike H Microsoft Excel New Users 0 1st May 2008 09:53 AM
Check if cell content changed bbussoloti Microsoft Excel Programming 4 7th Dec 2007 05:07 PM
Check Cell Content before continuing... =?Utf-8?B?Q2hyaXMgVC1N?= Microsoft Excel Programming 5 1st Nov 2007 03:39 AM
VBA cell content check =?Utf-8?B?RGVyZWsgV2l0dG1hbg==?= Microsoft Excel Programming 7 6th Sep 2006 07:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:49 AM.