+ Reply to Thread
Results 1 to 4 of 4

VBA If statement with two conditions

  1. #1
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    383

    VBA If statement with two conditions

    Hi all,

    I would like to ask whether someone can help me with the below.

    I would like to create a vba code with two multiple IF statements conditions (and).

    What I would like is as follows:

    - If columns GB:GM are visible
    AND
    - if the cell content of cell GH33 changes

    Then call Macro 2

    Can someone please help me with the above if it is possible.

    Appreciate a lot your kind help!!

    Thanks

    Keibri

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: VBA If statement with two conditions

    I'm a little confused. If columns GB through GM are hidden, then column GH would be hidden as well since it is within the range, therefore, GH33 would not be able to be changed manually.
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Forum Contributor
    Join Date
    02-09-2015
    Location
    malta
    MS-Off Ver
    Microsoft 365
    Posts
    383

    Re: VBA If statement with two conditions

    Hi gmr4evr1.

    Sorry for the late reply.

    The first condition is if GB:GM are visible

    So, what I would like is that if they are hidden the macro will not run

    Thanks a lot

    keibri

  4. #4
    Valued Forum Contributor
    Join Date
    04-24-2014
    Location
    United States
    MS-Off Ver
    Office 365 ProPlus
    Posts
    853

    Re: VBA If statement with two conditions

    My coding skills are a bit rusty, but give this a try.

    It goes in the worksheet your working with, not a normal module

    Please Login or Register  to view this content.
    Last edited by ptmuldoon; 02-14-2018 at 12:50 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 07-09-2015, 04:25 PM
  2. 3 Conditions for an IF Statement
    By Rocksteady in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-21-2013, 07:38 AM
  3. [SOLVED] various conditions that have to be met in an if statement
    By Manjula1 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 11-01-2012, 04:42 AM
  4. Using if statement with two conditions
    By fionn_ in forum Excel General
    Replies: 5
    Last Post: 07-03-2012, 09:43 AM
  5. @if statement with several conditions
    By grettagirl in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-15-2012, 12:52 PM
  6. VBA conditions if statement not met?
    By kaaver in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-14-2010, 11:40 AM
  7. why can i use 3 conditions in SQL statement only?
    By Tarek in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-17-2005, 03:05 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1