Consulting

Results 1 to 2 of 2

Thread: Only if has value

  1. #1
    VBAX Regular
    Joined
    Nov 2005
    Location
    Jefferson City
    Posts
    13
    Location

    Only if has value

    How can I change this to only if the cells in the range have a value?

    [VBA]
    If Not Intersect(Target, Range("C11:AG11, C22:AG22, C33:AG33)) Is Nothing
    [/VBA]


    Right now it only does what I need if a cell in that range is changed, but I don't need it to if it already has a value.

    Thanks,
    I'm here to help! cmyers1032@aol.com

  2. #2
    Administrator
    2nd VP-Knowledge Base
    VBAX Master malik641's Avatar
    Joined
    Jul 2005
    Location
    Florida baby!
    Posts
    1,533
    Location
    [VBA]If Intersect(Target, Range("C11:AG11, C22:AG22, C33:AG33")).Value <> vbNullString Then[/VBA]
    You could try this (untested air code...beware)....not sure if you meant the intersect range or the range you specified in the "Range()" piece...




    New to the forum? Check out our Introductions section to get to know some of the members here. Feel free to tell us a little about yourself as well.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •