+ Reply to Thread
Results 1 to 19 of 19

IF Then Statements

  1. #1
    Forum Contributor
    Join Date
    10-03-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    112

    IF Then Statements

    i have a spreadsheet for TV shows that I watch. I want to be able to put a x in a cell and have cell b2 data changed to the next episode and the the air date in Column D to cange for 7 days for what is currently there. I have attached a screen shot. I am open to any suggestions,
    HEre is the forula i tried just to see but it did not work.
    =IF(E2=x,(B3+1))

    =IF(E2="x",(B2+1))
    Attached Images Attached Images

  2. #2
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: IF Then Statements

    Attached your workbook with desired result.
    If you are http://www.excelforum.com/image.php?type=sigpic&userid=125481&dateline=1392355029happy with the results, please add to the contributor's
    reputation by clicking the reputation icon (star icon).




    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.
    To undo, select Thread Tools-> Mark thread as Unsolved.
    http://www.excelaris.co.uk

  3. #3
    Forum Contributor
    Join Date
    10-03-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: IF Then Statements

    Im Sorry I dont see anything attached

  4. #4
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: IF Then Statements

    I meant-Can you attached your workbook?

  5. #5
    Forum Contributor
    Join Date
    10-03-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: IF Then Statements

    oh ok ....Shows List.xlsx

  6. #6
    Forum Expert RobertMika's Avatar
    Join Date
    06-22-2009
    Location
    Haverhill, UK
    MS-Off Ver
    Excel 2003-13
    Posts
    1,530

    Re: IF Then Statements

    If E2=x then B2 will change to S03E05?
    But then what?
    What if you need E06?
    The only way to change a value to a new one if cell is already populated is to use VBA.
    Unless you will have your list of Titles and Episodes in different columns and the A-B column will be based on formulas.

  7. #7
    Forum Contributor
    Join Date
    10-03-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: IF Then Statements

    ok so how would i use VBA? Could you give me an example of your solution withthe different columns

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: IF Then Statements

    1st, I think you have an incorrect reference in E3?
    =E2=IF(E3="x",(B3+1)) This is causing a circ ref error

    Then in all the rows after that in E, you need to put "" around all the text references...
    =IF(E4=x,(B4=S03E04))
    ...=IF(E4="x",(B4="S03E04"))

    And finally, your IF() statements dont really make sense. The syntax for an IF statement is...
    =if(criteria-to-test,what-to-do-if-test=TRUE,what-to-do-if-test=FALSE)
    so...IF(E4="x",then do this, else do that...

    Perhaps if you explain exactly what you are trying to do?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  9. #9
    Forum Contributor
    Join Date
    10-03-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: IF Then Statements

    i am trying to have a list of tv shows that when i watch on episode the list tells me what the next eipsode # is and what date it airs.

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: IF Then Statements

    Can you show a few samples of what your expected outcome would be?

  11. #11
    Forum Contributor
    Join Date
    10-03-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: IF Then Statements

    thats my issue i dont know how to achieve it
    Basically if i have
    Please Login or Register  to view this content.
    and i somehow tell excel i watched it then excel changes the values to
    Please Login or Register  to view this content.

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: IF Then Statements

    OK well anyone who watches the Walking Dead, is worthy of extra help

    I will see what I can put together for you

  13. #13
    Forum Contributor
    Join Date
    10-03-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: IF Then Statements

    ok thank you very much

  14. #14
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: IF Then Statements

    Take a look at he attached, see if we are heading in the right direction. I changed B to "Episode watched" and added a "next episode". When you enter an "x" in E, it will populate F with the next episode.

    We need to figure out how to handle the column C data though - I have a test in F that checks for "Finished" so maybe give some thought to some consistency in the type of data you will put in that column?
    Attached Files Attached Files

  15. #15
    Forum Contributor
    Join Date
    10-03-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: IF Then Statements

    ok so what about dont worry about column C and and do the formula that if E2="" then (B2,2+1) and D2 + 7 days then reset E2 to blank
    Last edited by compgeek1979; 10-30-2013 at 12:09 AM. Reason: Misspelled

  16. #16
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: IF Then Statements

    This will change the "next" based just on if there is an "x" in E. To reset and change things back, will take VBA, and thats not my strong point
    =IF(E2="","",LEFT(B2,3)&MID(B2,4,1)&TEXT(RIGHT(B2,2)+1,"00"))

  17. #17
    Forum Contributor
    Join Date
    10-03-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: IF Then Statements

    by using your method I will have to go back into the Cells in the B column and edit them to get ready for the next episode correct?

  18. #18
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,933

    Re: IF Then Statements

    Yes, unfortunately

  19. #19
    Forum Contributor
    Join Date
    10-03-2012
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    112

    Re: IF Then Statements

    That kind of defeats the purpose of my intent.

+ 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. Reading If statements and formulating values from if statements
    By crnam in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-16-2013, 05:20 AM
  2. questions with if statements and nested if statements
    By Pat Excel in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 02-03-2013, 01:41 PM
  3. Multiple nested IF statements and AND statements
    By TonyGetz in forum Excel General
    Replies: 2
    Last Post: 12-14-2010, 03:07 AM
  4. Replies: 12
    Last Post: 05-15-2009, 08:38 AM
  5. [SOLVED] operator statements, shorting when reusing one of the statements?
    By KR in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-04-2005, 02:05 PM

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