+ Reply to Thread
Results 1 to 10 of 10

Help on correct use of If statement within formula

  1. #1
    Registered User
    Join Date
    05-07-2011
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    5

    Help on correct use of If statement within formula

    Hi I'm pretty new at using excell for more than anything really really simple but I have to put together a spreadsheet in work and I am stuck on what is probably really simple so any help will be really appreciated, I will try to explain it:

    I want to display in a cell a sum but only if in the same row there is a value entered that I need. So for example in cell N17 I want to add Numbers from column K lets say K7 but only if in the same row in Column N7 has Y in it. Does that makes sense in my head its something like if(N7=Ythen+K7)

    Please help

    Thanks
    Attached Files Attached Files
    Last edited by cpyates; 05-07-2011 at 03:07 PM. Reason: poor title

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Formula help please

    Hello & Welcome to the Board,

    Please take a few minutes and read the forum rules about proper posting and then reword your thread title to something searchable. Makes it helpful for those searching for answers.

    Maybe: Proper syntax for using an If statement within formula

    =IF(N7="Y",K7,"N7 Does not equal Y")
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    05-07-2011
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Help on correct use of If statement within formula

    Brilliant thanks for the help, changed the title hope its better, quick other question how would i add more cells in the row?

    Thanks

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Help on correct use of If statement within formula

    Changed title is great...thanks

    Possibly need some more explanation on what cells?

  5. #5
    Registered User
    Join Date
    05-07-2011
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Help on correct use of If statement within formula

    so in the same column K8 K9 K10 etc i need to do the same calculation so if Y in N8 N9 N10 add all them together and display in seperate cell, again hope that makes sense. Really really appreciate your help!

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Help on correct use of If statement within formula

    So are you saying if N8:N10 has a Y then sum up K8:K10?

    If so =IF(COUNTIF(N8:N10,"Y")=3,SUM(K8:K10),"Not all Y's")

    If this does not do it then please attach a small sample book with what you have and what results you expect.

  7. #7
    Registered User
    Join Date
    05-07-2011
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Help on correct use of If statement within formula

    Didnt seem to work, example attached at the top.

    Thanks

  8. #8
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Help on correct use of If statement within formula

    Give this a go.

    =SUMIF($C4:$C13,"Y",$B4:$B13)

  9. #9
    Registered User
    Join Date
    05-07-2011
    Location
    wales
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Help on correct use of If statement within formula

    Perfect, Jeff your a lifesaver cant thank you enough! TOP MAN.

    Thanks Again

    Chris

  10. #10
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Help on correct use of If statement within formula

    You're welcome Chris...good luck the rest of the way

    Thank you for the sample workbook which can make it far easier sometimes to get the right answer.

    If you are satisfied with the answer provided, please don’t forget to mark the thread as solved.

    How to mark a thread Solved
    Go to the first post
    Select
    -- Edit
    -- Go Advanced
    -- Below the word Title you will see a dropdown with the word No prefix
    -- Update to Solved and then select Save

+ 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