Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
vee vee is offline
external usenet poster
 
Posts: 12
Default Excel VB issue

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Excel VB issue

If Range("B13").Value = "" Then
--
Gary''s Student - gsnu200802
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Excel VB issue

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)

"Vee" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 342
Default Excel VB issue

I like:

If IsEmpty(Range("B13") then


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel issue pierre Excel Discussion (Misc queries) 2 April 8th 08 04:15 PM
Data Import to Excel Issue with Excel 2007 and Excel 2003 on same Melsh Excel Discussion (Misc queries) 0 August 1st 07 09:32 PM
Excel issue noor Excel Discussion (Misc queries) 1 January 9th 06 08:32 PM
Odd issue with Excel 97 SR-2 Gordon Excel Discussion (Misc queries) 3 February 10th 05 08:52 PM
Excel 2003 Issue with UsedRange.Copy (code works in Excel 2002) TechFirm Excel Programming 4 January 21st 05 01:53 AM


All times are GMT +1. The time now is 10:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"