+ Reply to Thread
Results 1 to 8 of 8

Choosing Cell ranges in embedded if statements

  1. #1
    Registered User
    Join Date
    10-15-2012
    Location
    Saskatoon, Saskatchewan
    MS-Off Ver
    Excel 2010
    Posts
    4

    Choosing Cell ranges in embedded if statements

    OK so here is a small sample of the code I am using. Basicly what it is doing is:
    IF H2 on Sheet "OCT 8 - 13" = 200 then it will display "01REVN1020" in the cell. pretty straight forward, where I'm having trouble is I wan't the exact same code to work for H2 to H200. IF('OCT 8 -13'!H2:H200=200,"01REVN1020")

    =IF('OCT 8 -13'!H2<200,"",IF('OCT 8 -13'!H2=200,"01REVN1020",IF('OCT 8 -13'!H2=201,"01REVN1020",IF('OCT 8 -13'!H2=202,"01REVN1020",IF('OCT 8 -13'!H2=203,"01REVN1020")))))

  2. #2
    Registered User
    Join Date
    10-09-2012
    Location
    Mumbai,India
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Choosing Cell ranges in embedded if statements

    Use below and let me know if this helps to resolve your query.

    =IF('OCT 8 - 13'!H2>=200,"01REVN1020","")

    Thanks & Warm Regards,

    Prasad Avasare

  3. #3
    Registered User
    Join Date
    10-15-2012
    Location
    Saskatoon, Saskatchewan
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Choosing Cell ranges in embedded if statements

    thank you for your reply. what I am looking for is to have that statement read the same for H2, H3, H4 etc...without having to write the code over and over. So instead of writing:

    =IF('OCT 8 - 13'!H2>=200,"01REVN1020","")
    =IF('OCT 8 - 13'!H3>=200,"01REVN1020","")
    =IF('OCT 8 - 13'!H4>=200,"01REVN1020","")

    these lines would all be combined into one line of code.
    :-)

  4. #4
    Registered User
    Join Date
    10-09-2012
    Location
    Mumbai,India
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Choosing Cell ranges in embedded if statements

    Are you looking for macro code? can you attach a file what you are exactly looking for.

  5. #5
    Registered User
    Join Date
    10-09-2012
    Location
    Mumbai,India
    MS-Off Ver
    Excel 2007
    Posts
    25

    Re: Choosing Cell ranges in embedded if statements

    User this formula =IF('OCT 8 - 13'!$H$2:$H$5>=200,"01REVN1020","") and hit ctrl+shift+enter

    Thanks & Warm Regards,
    Prasad Avasare

  6. #6
    Registered User
    Join Date
    10-15-2012
    Location
    Saskatoon, Saskatchewan
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Choosing Cell ranges in embedded if statements

    You are Brilliant... Thank you!!!!

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Choosing Cell ranges in embedded if statements

    @ Jaminman

    Welcome to the forum.

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  8. #8
    Registered User
    Join Date
    10-15-2012
    Location
    Saskatoon, Saskatchewan
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Choosing Cell ranges in embedded if statements

    OK, so it turns out the last post solved one problem but was not quite complete. if I enter the number 100 into H2 I get the result 1010 in my desired cell; however, if I enter the number 200 into cell H3 after, it returns the result 1010 as well where it should return the result 1020.
    Whatever the result is in H2 is repeated no matter the number inputted.

    Additional information that I'm not sure if may be causing a problem or is relevant.
    The above mentioned code is on it's own sheet labeled "List". It is accessed from the page where the working spreadsheet is by using this code: =IF(H2>0,List!C2,""). So if H2 have a value greater that 0 it will access the formula on the List page.

    Not sure if that makes sense.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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