+ Reply to Thread
Results 1 to 3 of 3

Correct syntax in If Then statement to make 2 things happen if condition met

  1. #1
    Registered User
    Join Date
    04-22-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    59

    Correct syntax in If Then statement to make 2 things happen if condition met

    This will doubtless turn out to be a typical Noob question but here goes.

    I have some code which will tidy up a user input form based on the number of periods selected in F4 but I also want to place the value in G22 into a specified row (obviously not one of those already cleared by the first Then action) without having to duplicate the If statement as a separate line of code.

    I've included the code. Ive included the bit that doesnt work in the first If statement just to give an alternative description of what I am trying to achieve. Hope this makes sense

    Option Explicit

    Please Login or Register  to view this content.
    Thanks
    Last edited by coasterman; 12-19-2011 at 01:53 PM.

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Correct syntax in If Then statement to make 2 things happen if condition met

    Please put your code in tags - it makes it easier to read


    I'm not really sure what you want to do, but try the following:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-22-2011
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    59

    Re: Correct syntax in If Then statement to make 2 things happen if condition met

    That's very cool, and humbling!

    If I could beg a second question. I'm trying to do much the same thing with the G22 value into the D column but I get "expected list or separartor or) Bad syntax?

    Please Login or Register  to view this content.
    Last edited by coasterman; 12-19-2011 at 01:52 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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