+ Reply to Thread
Results 1 to 7 of 7

Need help with a IF function, please

  1. #1
    Registered User
    Join Date
    01-04-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    3

    Need help with a IF function, please

    Hi there... just found this site and it has been very helpful. I am hoping someone can help me out. I am trying to create a monthly profitability statement. In one tab of my workbook would be a list of expenses (Expense Input tab) with the following column headers:

    Column A - Date
    Column B - Classification (type of expense i.e. Advertising, Cost of Goods Sold, etc)
    Column C- Dollar Amount
    Column D - Vendor

    On my profitability statement, each column is a different month. I am trying to write a formula where it will basically say "if it is an Advertising expense and it falls between 1/1/13 and 1/31/13, show the dollar amount." I put in two entries for Advertising in different months and started out by using this formula:

    =SUMIFS('Expense Input'!$C$3:$C$1000,'Expense Input'!$B$3:$B$1000,"Advertising")

    This obviously brought back both dollar amounts. I then tried to add in a second date range condition and NOTHING I tried worked. Can anyone see what I am doing wrong? Thanks again!
    Attached Files Attached Files
    Last edited by pgreen822; 01-04-2013 at 12:53 AM.

  2. #2
    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,946

    Re: Need help with a IF function, please

    its almost impossible to say what the problem is without seeing a sample workbook. the formula above looks ok, but to add a date range, it should look something like this, assuming 1/1/13 is in B1 and 1/31/13 is in C1...

    =SUMIFS('Expense Input'!$C$3:$C$1000,'Expense Input'!$B$3:$B$1000,"Advertising",the-date-you-are-testing,">=&B1,the-date-you-are-testing,"<"&C1)

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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

  3. #3
    Registered User
    Join Date
    01-04-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Need help with a IF function, please

    Thanks for your quick response! I attached the file.

  4. #4
    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,946

    Re: Need help with a IF function, please

    try this, copied across...
    =SUMIFS('Expense Input'!$C$3:$C$1000,'Expense Input'!$B$3:$B$1000,"Advertising",'Expense Input'!$A$3:$A$1000,">="&B$4,'Expense Input'!$A$3:$A$1000,"<"&C$4)

  5. #5
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Need help with a IF function, please

    Try this in B19, then copy down
    Please Login or Register  to view this content.
    Quang PT

  6. #6
    Registered User
    Join Date
    01-04-2013
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Need help with a IF function, please

    You guys are awesome! Thank you so much!

  7. #7
    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,946

    Re: Need help with a IF function, please

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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