1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Excel 7.0 IF statement

Discussion in 'Other PC Software' started by jvwert, 2003/01/07.

Thread Status:
Not open for further replies.
  1. 2003/01/07
    jvwert

    jvwert Inactive Thread Starter

    Joined:
    2002/10/16
    Messages:
    46
    Likes Received:
    0
    In Excel 7.0, I have a spreadsheet wherein I would like to have the user type in the month (January, February, etc.) and have another cell list the month number (1, 2, etc.) I use this to compute values of CDs.

    I have tried the IF statement, but cannot get it to "stack" IF statements, such as one for each month. for example,=IF(E1= "December ",12) yields "12 ". Fine, but I could find no way to add even one more month , when I would like eleven more.

    Also, in Excel 7.0, is there any way to "default" the printing of grid lines. I always want them in my printouts, but always have to go through the chore of Page Setup / Sheet, etc., which is a real pain in you know where.

    Can anyone help?

    Jack Wert
     
  2. 2003/01/07
    KevinSaul

    KevinSaul Inactive

    Joined:
    2002/01/07
    Messages:
    425
    Likes Received:
    0
    If staements can be bundled together like this:

    IF(E1=January,1,IF(E1=February,2,IF(E1=March,3)))

    Just remember to have the same number of closed parentheses at the end as you have open parentheses throughout the statement.

    Unfortunately you're limited as to the number of IF statements you can bundle together to a maximum of 7.

    I don't know of any way of setting the gridlines to print automatically. Maybe someone else can help there.
     

  3. to hide this advert.

  4. 2003/01/07
    Zephyr

    Zephyr Inactive

    Joined:
    2002/01/21
    Messages:
    1,519
    Likes Received:
    0
    I use QuattroPro and it doesn't have that limit. That does little to help you though jvwert. Perhaps you should try using one of the DATE formulas for your purpose. I'm sure one of those will allow you to get around this block. It would require the user to enter numeric dates as opposed to alpha types.

    As for setting the program to print the gridlines by default, that would be a matter of setting the workbook up the way you like it and saving it as a template *.xlt). Then create a shortcut to that template for opening Excel rather than using the normal method.

    Cheers. :)
    ps,just to rub it in further, I just tried@IF(E1= "January ",1,IF(E1= "February ",2,IF(E1= "March ",3,if(e1= "april ",4,if(e1= "may ",5,if(e1= "june ",6,if(e1= "july ",7,if(e1= "august ",8,if(e1= "september ",9,if(e1= "october ",10,if(e1= "november ",11,if(e1= "december ",12," ")))))))))))) in QuattroPro and it worked just fine.
     
    Last edited: 2003/01/07
  5. 2003/01/07
    WhitPhil

    WhitPhil Inactive

    Joined:
    2002/01/07
    Messages:
    599
    Likes Received:
    4
    If the textual month is input to cell A1, then this formula should turn it into a number.

    =CHOOSE(MATCH(A1,{ "January "; "February "; "March "; "April ";
    "May "; "June "; "July "; "August "; "September "; "October ";
    "November "; "December "},0),1,2,3,4,5,6,7,8,9,10,11,12)
     
  6. 2003/01/07
    aleekat

    aleekat Inactive

    Joined:
    2002/01/07
    Messages:
    902
    Likes Received:
    0
    Tools, options, put a checkmark in gridlines.(to show) Select(highlight all cells) right click, format cells, border, then line what you want. Save, then when you reopen those lines will be back. Hope thats what your looking for.
     
  7. 2003/01/12
    jvwert

    jvwert Inactive Thread Starter

    Joined:
    2002/10/16
    Messages:
    46
    Likes Received:
    0
    Escel 7.0 IF Statement

    Thanks, guys, for the holp.

    To KevinSaul - I am awasre of the limitation of Excel for that statement, but obviously need 12 IFs, and therefore can not use it.

    To WhitPhil - Thanks, I will try that and let you know how I make out. It may be the only way to do it in Excel.

    To Zephyr, (Quattro Pro) Thanks, I am aware of that and have Quattro, but do not use it, as I have too much stuff in Excel, and frequently use links to update various inter-related sheets.]

    Jack
     
  8. 2003/01/12
    Zephyr

    Zephyr Inactive

    Joined:
    2002/01/21
    Messages:
    1,519
    Likes Received:
    0
    Hi Jack!

    Whit's formula will work for you. You can even embellish it some to get rid of the error message when nothing is entered in A1:

    =IF(A1>" ",CHOOSE(MATCH(A1,{ "January "; "February "; "March "; "April "; "May "; "June "; "July "; "August "; "September "; "October "; "November "; "December "}),1,2,3,4,5,6,7,8,9,10,11,12)," ")

    Best regards.

    :)
     
    Last edited: 2003/01/12
  9. 2003/01/12
    Zephyr

    Zephyr Inactive

    Joined:
    2002/01/21
    Messages:
    1,519
    Likes Received:
    0
    Even with all that width, you'll have to concatenate the comma at the end of first line to the bracket that begins the second line. Better yet, highlight it all, copy/paste it into the data entry field of ExCel and it'll work just fine.

    :)
     
    Last edited: 2003/01/13
  10. 2003/01/17
    jvwert

    jvwert Inactive Thread Starter

    Joined:
    2002/10/16
    Messages:
    46
    Likes Received:
    0
    IF Statement in Excel 7.0

    To WhitPhil - Your solution works fine. Many Thanks.

    To Zephyr - Thanks also for your embellishment.

    To aleekat - I have not yet tried your fix, but
    will shortly, and will let you know.

    This BBS is great!

    Jack
     
  11. 2003/01/17
    jvwert

    jvwert Inactive Thread Starter

    Joined:
    2002/10/16
    Messages:
    46
    Likes Received:
    0
    Excel 7.0 printing gridlines

    To aleekat - Thanks for your suggestion, but I am aware of the use of Format/Cells, etc. and that will work, but I would have to do it with each page I create, What I want is a way to create the default sheet that would not require extra operations to print gridlines - something I want for all of my spreadsheets. The present default format does not print gridlines even though they appear on the screen in my basic default worksheet. I have to go through: File / Page Setup / Sheet, and then check the Print Gridlines box. I have not found a way to make that my default.

    Apparently Microsoft does not like users to create their own defaults.

    Thanks, any way for your effort.

    Jack
     
  12. 2003/01/17
    Zephyr

    Zephyr Inactive

    Joined:
    2002/01/21
    Messages:
    1,519
    Likes Received:
    0
    Jack, Just open the default sheet, go to the Page Setup and tag that Gridline box, then do a "Save As" and name it myway.xls. Then close out and locate that file and make a Desktop Shortcut to it. Voila!

    Of course when you open it for use, you'll want to save under some different name to preseve your template copy. You can "Customize" that template to suit your own tastes.

    Cheers. :)
     
  13. 2003/01/17
    aleekat

    aleekat Inactive

    Joined:
    2002/01/07
    Messages:
    902
    Likes Received:
    0
    If your unsure about Zephy suggestion, open Excel help, search for "template ", I believe your issue is covered.
     
  14. 2003/01/17
    Zephyr

    Zephyr Inactive

    Joined:
    2002/01/21
    Messages:
    1,519
    Likes Received:
    0
    Now aleekat That's just too too easy. I hate when programs have features like that. :) I'd much rather hack the Registry to death. :D

    It's good to know also that you can create spreadsheet configuration you like and do a "save as" and select the .XLT extension. You can even rename an existing one and have it become a template. Then move it into the folder C:\Program Files\Microsoft Office\Templates\Spreadsheet Solutions and it'll be available when you choose to open a "New" program.

    :cool:
     
  15. 2003/01/17
    jvwert

    jvwert Inactive Thread Starter

    Joined:
    2002/10/16
    Messages:
    46
    Likes Received:
    0
    Excel 7.0 printing grid lines default

    Gadzooks, you guys did it again. I now have my default template as a shortcut icon on my desktop, and when I want to create a new worksheet, it will have the gridline printing as its normal condition.

    Thanks much - both Zyphyr and allekat.

    Jack
     
  16. 2003/01/17
    Zephyr

    Zephyr Inactive

    Joined:
    2002/01/21
    Messages:
    1,519
    Likes Received:
    0
    I'm glad if you're glad Ed!

    Always think outside the box and you'll be able to cope with most of these one-eyed monster problems.

    Study the previous posts and you'll see how to make the template you fashioned a normal option when you click File > "New" in the Excell program. The Desktop Shortcut is good too, just decide for yourself and let the chips fly!

    Best regards. :)
     
Thread Status:
Not open for further replies.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.