+ Reply to Thread
Results 1 to 7 of 7

I need to modify this >>> =IF(OR(ISTEXT(B5),ISTEXT(B6)),0,MOD(B6-B5,1)*24)

  1. #1
    Forum Contributor jonvanwyk's Avatar
    Join Date
    06-28-2010
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2010
    Posts
    452

    I need to modify this >>> =IF(OR(ISTEXT(B5),ISTEXT(B6)),0,MOD(B6-B5,1)*24)

    [see attached]

    In an electronic spreadsheet I am making, I need "text" to equal 0. This is why I was using:

    =IF(OR(ISTEXT(B5),ISTEXT(B6)),0,MOD(B6-B5,1)*24)

    I have found two exceptions to this rule, and they are labeled "SCHOOL" AND "TRAINING". When B5 or B6 is equal to either of these two, I need the cell containing the formula to equal whatever number has been entered into B12.

    Thank you very much in advance to anyone who is able to assist!
    Attached Images Attached Images
    Last edited by jonvanwyk; 07-01-2010 at 08:35 AM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: I need to modify this >>> =IF(OR(ISTEXT(B5),ISTEXT(B6)),0,MOD(B6-B5,1)*24)

    Post the
    electronic spreadsheet
    or part thereof, and not the old fashioned pen and paper, sorry screenshot.

    It makes life so much simpler, most of us prefer it that way, we are very lazy and dislike extra work ..... ....
    Last edited by Marcol; 06-30-2010 at 11:06 AM.

  3. #3
    Forum Contributor jonvanwyk's Avatar
    Join Date
    06-28-2010
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2010
    Posts
    452

    Re: I need to modify this >>> =IF(OR(ISTEXT(B5),ISTEXT(B6)),0,MOD(B6-B5,1)*24)

    Quote Originally Posted by Marcol View Post
    Post the and not the old fashioned pen and paper, sorry screenshot.

    It makes life so much simpler, most of us prefer it that way, we are very lazy and dislike extra work ..... ....
    I try to avoid attaching the actual document as it usually leads to ridicule. I consider myself a decent user of excel, but since I am self taught I often have an unorthodox approach to certain problems which lead others to say "Why the hell did you do it that way?" This is why I like to make the spreadsheet work perfectly, and then hide/lock ALL of my work for no one to see :-)

    See Attached Spreadsheet & get your jabs in :-/

    (Please note: The actual timesheet portion of the spreadsheet, A1 through S34, looks exactly like the printed one that is done by hand today. It would have been much easier to bring my creation to life if I was not constrained like this. It is also why there are so many merged cells.)
    Attached Files Attached Files
    Last edited by jonvanwyk; 06-30-2010 at 11:14 AM.

  4. #4
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: I need to modify this >>> =IF(OR(ISTEXT(B5),ISTEXT(B6)),0,MOD(B6-B5,1)*24)

    OMG.

    You weren't kidding.

    I'm not saying I like the way you're doing this but you can simply insert the logic of one into the other - i.e.
    =if(or(b5="school",b5="training",b6="school",b6="training"),b12,0)

    goes in place of 0 in

    =IF(OR(ISTEXT(B5),ISTEXT(B6)),0,MOD(B6-B5,1)*24)

    giving

    =IF(OR(ISTEXT(B5),ISTEXT(B6)),if(or(b5="school",b5="training",b6="school",b6="training"),b12,0),MOD(B6-B5,1)*24)

    Yuck, I feel dirty
    CC


    If you feel really indebted please consider a donation to charity. My preferred charity is ActionAid but there are plenty of worthy alternatives.

  5. #5
    Forum Contributor jonvanwyk's Avatar
    Join Date
    06-28-2010
    Location
    Iowa, USA
    MS-Off Ver
    Excel 2010
    Posts
    452

    Re: I need to modify this >>> =IF(OR(ISTEXT(B5),ISTEXT(B6)),0,MOD(B6-B5,1)*24)

    Quote Originally Posted by Cheeky Charlie View Post
    OMG.

    You weren't kidding.

    Yuck, I feel dirty
    I told you. Forward looking at other things I want to do, I have decided to modify the appearance of the timesheet, but just a little. It will make things MUCH simpler, but I will probably still need a little help. Stay tuned :-)

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: I need to modify this >>> =IF(OR(ISTEXT(B5),ISTEXT(B6)),0,MOD(B6-B5,1)*24)

    Hmmm ......

    Aren't you confusing ridicule with criticism?

    It would not be the first time, nor will it be the last, that I have answered a thread, and them someone else comes up with a better solution.

    I accept this as constructive criticism not ridicule.
    Ultimately this benefits both me and the OP ......bonus!

    You might be surprised by how many people on this forum that are self-taught. You are not alone.

    However if, as you say
    I like to make the spreadsheet work perfectly, and then hide/lock ALL of my work for no one to see
    how do you expect to progress?

    If everybody adopted this approach where do you think we might end up?
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  7. #7
    Forum Expert
    Join Date
    08-27-2008
    Location
    England
    MS-Off Ver
    2010
    Posts
    2,561

    Re: I need to modify this >>> =IF(OR(ISTEXT(B5),ISTEXT(B6)),0,MOD(B6-B5,1)*24)

    My criticism would definitely fall under 'ridicule' not 'constructive criticism' - I'm too lazy to mend all the world's ills... and ridicule is funner.

+ 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