+ Reply to Thread
Results 1 to 13 of 13

really need help with IF syntax.... :-\

  1. #1
    Registered User
    Join Date
    07-08-2014
    Location
    Seattle, WA
    MS-Off Ver
    Office Professional Plus 2010
    Posts
    7

    really need help with IF syntax.... :-\

    i have an event spreadsheet that i've created to calculate a fee, the payment received for the fee and the difference due (or overpaid). if there are no amounts entered to make up one of the formulas, i want the cell to show blank. right now it puts $0.00 in it.

    i've attached a sample of the spreadsheet. here are the two formulas i have in it.

    *formula in column O: =SUM(G4:N4) add all amounts between G and N and put the total here. if there are no numbers in G thru N, don't put anything here.

    *formula in column S: =P4-O4 subtract the payment (P4) from what is due (O4) and put the amount here. if there are no numbers in O, don't put anything here.

    in the attached spreadsheet, line 3:, henry miller sent in his form/payment for what days and meals he's coming, so the formulas in columns O and S have numbers in them, because the related cells have numbers in them.

    however, john doe said he's coming to the event verballd, but he didn't send form/payment in, so i can't enter any numbers in the sheet yet; but i want to record his name and that he's coming. and instead of columns O and S having 0.00 in them, i want the formula to be there, but the cell blank (until numbers are entered into the other cells).

    so....can anyone tell me exactly what to put for the formulas in columns O and S to do what i want it to do? i have been trying to read tutorials on the IF function and i can't make heads or tails of it.

    i hope that makes sense. let me know if you have a question.

    thanks! :-)
    Attached Files Attached Files

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,416

    Re: really need help with IF syntax.... :-\

    Use this in O4:

    =IF(SUM(G4:N4)=0,"",SUM(G4:N4))

    and this in S4:

    =IF(O4="","",P4-O4)

    then copy the formulae down.

    Hope this helps.

    Pete

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,950

    Re: really need help with IF syntax.... :-\

    Excel options > Advanced > Display options for this worksheet > uncheck "show zero..."
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    07-08-2014
    Location
    Seattle, WA
    MS-Off Ver
    Office Professional Plus 2010
    Posts
    7

    Re: really need help with IF syntax.... :-\

    thank you, thank you! i'm at home right now (no computer), but i'll give these tips a try tomorrow, and let you know what happens! ☺

  5. #5
    Registered User
    Join Date
    07-08-2014
    Location
    Seattle, WA
    MS-Off Ver
    Office Professional Plus 2010
    Posts
    7

    Re: really need help with IF syntax.... :-\

    bingo! we have a winner!!

    while i'm sure both solutions provided would have worked, the easiest to try was changing the excel settings, which protonLeah suggested. voila! it blanked out all of the cells with a zero value in them.

    thanks again!! i just love forums like this where you can ask a question and smarter brains than mine know the answers...ha!


  6. #6
    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
    53,048

    Re: really need help with IF syntax.... :-\

    Miss0 welcome to the forum

    Be aware that with "dont show zero" you need to keep in mind that a cell may appear blank, but contain zero. So a formula like =IF(A1="",""...will not show "" if A1 contains zero (but shows blank)

    Just a thought
    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

  7. #7
    Registered User
    Join Date
    07-08-2014
    Location
    Seattle, WA
    MS-Off Ver
    Office Professional Plus 2010
    Posts
    7

    Re: really need help with IF syntax.... :-\

    hmmm....i'll have to think about that. i'll think i'll try it both ways, and see which one makes the most sense. if someone's all paid up, it probably should show zero...

    thanks for thinking of that! :-)

  8. #8
    Registered User
    Join Date
    07-08-2014
    Location
    Seattle, WA
    MS-Off Ver
    Office Professional Plus 2010
    Posts
    7

    Re: really need help with IF syntax.... :-\

    okay....so i put the formulas that pete_uk provided in (as fdibbins suggested) and yes, that is probably better cuz it shows blank if nothing has been paid at all, but it shows zero if the amount due minus the amount paid equals zero.

    thanks again! :-)

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,416

    Re: really need help with IF syntax.... :-\

    Also, my solution helps you with the IF syntax, which is what you had asked for.

    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

  10. #10
    Registered User
    Join Date
    07-08-2014
    Location
    Seattle, WA
    MS-Off Ver
    Office Professional Plus 2010
    Posts
    7

    Re: really need help with IF syntax.... :-\

    Quote Originally Posted by Pete_UK View Post
    Also, my solution helps you with the IF syntax, which is what you had asked for.
    yes, it does...thanks! :-)

    Quote Originally Posted by Pete_UK View Post
    If that takes care of your original question, please select Thread Tools from the menu above your first post and mark this thread as SOLVED.
    done! :-)

    Quote Originally Posted by Pete_UK View Post
    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete
    good to know! done, done and done!

    thanks all! :-)

  11. #11
    Registered User
    Join Date
    07-08-2014
    Location
    Seattle, WA
    MS-Off Ver
    Office Professional Plus 2010
    Posts
    7

    Re: really need help with IF syntax.... :-\

    Quote Originally Posted by Pete_UK View Post
    Also, my solution helps you with the IF syntax, which is what you had asked for.
    sometimes i don't know for sure *what* i'm asking for....ha! but in any case, two awesome solutions were provided. :-)

  12. #12
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,416

    Re: really need help with IF syntax.... :-\

    And thank you for feeding back, and for the Reps.

    Pete

  13. #13
    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
    53,048

    Re: really need help with IF syntax.... :-\

    Glad my input helped (Pete did the work), and thanks for the feedback

+ 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. Different Syntax’s
    By penfold1992 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-26-2013, 11:30 AM
  2. Looking for better syntax
    By peri1224 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-20-2012, 10:21 AM
  3. Syntax help
    By TRJJK73 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-27-2009, 12:40 PM
  4. 'If' syntax
    By hvisa in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-30-2007, 04:33 PM
  5. Syntax help please
    By GettingThere in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-18-2005, 09: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