Excel VB issue

  • Thread starter Thread starter Vee
  • Start date Start date
V

Vee

I am checking a cell to see if it is blank or populated. For some reason it
is not recognizing my "if" statement that = "" or <>"". Below is the code:

If Range("B13").Formula = """" Then
Range("A12:A23").Select
Selection.Copy
Sheets("DetailFinal").Select
Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=True
Sheets("Worksheet").Select
End If
 
Don't bother with the selecting

If Range("B13").Value = "" Then
Range("A12:A23").Copy
Sheets("DetailFinal").Range("A2").PasteSpecial Paste:=xlPasteAll, _
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
End If
Application.CutCopyMode = False

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top