+ Reply to Thread
Results 1 to 5 of 5

Refering to More than One Sheet in an If/Then Statement

  1. #1
    Registered User
    Join Date
    09-17-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2003
    Posts
    21

    Refering to More than One Sheet in an If/Then Statement

    I am having trouble refering to more than one sheet in an If/Then statement.

    I am looking to do

    If sheet2(cell1)>100 then sheet1(cell1)=sheet2(cell1)
    Else sheet1(cell1)=sheet2(cell2)

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Refering to More than One Sheet in an If/Then Statement

    Something like this, maybe:

    Please Login or Register  to view this content.
    Without knowing a bit more about your workbook structure and what you're trying to do then it's harder to be more precise.

  3. #3
    Registered User
    Join Date
    09-17-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Refering to More than One Sheet in an If/Then Statement

    Book1.xls

    I am trying to make this a macro.

  4. #4
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Refering to More than One Sheet in an If/Then Statement

    May I ask why? The formula works, formula are generally faster than macros, they don't cause any security problems when distributing workbooks and, for simple things like this, they're easier to work with.

    But, anyway, a slight modification of the code I posted above, to change the cell references to the appropriate ones should do the trick.

  5. #5
    Registered User
    Join Date
    09-17-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Refering to More than One Sheet in an If/Then Statement

    Thanks. See the reason I need a macro is I need to run this for an undetermined amount of people so this is the start and for some reason it wasn't working. Basically once all the scores are calculated for a person it gives them a level then I need it to run again for the next person.

+ 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