Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default What is the proper syntax

I have the following in a worksheet change event

If Target.Offset(0, 1).Value Target.Offset(-1, 1).Value And _
Target.Offset(0, 2).Value Is Not blank And _
Target.Offset(0, 3).Value Is Not blank And _
Target.Offset(0, 4).Value Is Not blank And _
Target.Offset(0, 5).Value Is Not blank And _
Target.Offset(0, 6).Value Is Not blank And _
Target.Offset(0, 7).Value Is Not blank Then

end if

I'm not sure this is correct. I need to check to see that these cells are
blank and if they aren't, I want to do something else.

Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default What is the proper syntax

If Target.Offset(0, 1).Value Target.Offset(-1, 1).Value And _

Application.CountBlank(Range(Target.Offset(0,2)),T arget.Offset(0,7))) =
0 Then

Charles Chickering

Barb Reinhardt wrote:
I have the following in a worksheet change event

If Target.Offset(0, 1).Value Target.Offset(-1, 1).Value And _
Target.Offset(0, 2).Value Is Not blank And _
Target.Offset(0, 3).Value Is Not blank And _
Target.Offset(0, 4).Value Is Not blank And _
Target.Offset(0, 5).Value Is Not blank And _
Target.Offset(0, 6).Value Is Not blank And _
Target.Offset(0, 7).Value Is Not blank Then

end if

I'm not sure this is correct. I need to check to see that these cells are
blank and if they aren't, I want to do something else.

Thanks in advance


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
Proper syntax for this Barb Reinhardt Excel Discussion (Misc queries) 1 August 4th 06 02:15 PM
Proper SQL Syntax - DAO MSweetG222 Excel Programming 2 February 17th 06 09:31 PM
proper syntax order Roberta H via OfficeKB.com Excel Worksheet Functions 2 January 18th 06 10:14 PM
Proper Syntax for Date Modified? Marty Excel Programming 1 January 29th 05 04:58 PM
proper syntax in code needed Jim May Excel Programming 2 September 19th 04 12:44 AM


All times are GMT +1. The time now is 02:40 PM.

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

About Us

"It's about Microsoft Excel"