+ Reply to Thread
Results 1 to 12 of 12

Formula not working but should :)

  1. #1
    Registered User
    Join Date
    06-20-2019
    Location
    Serbia
    MS-Off Ver
    2016
    Posts
    6

    Formula not working but should :)

    HI Guys,

    I'm stuck with my formula.

    When you open attached excel file, sheet "CC Tips", Column F should have values instead of #N/A

    I appreciate any help.
    Attached Files Attached Files
    Last edited by SasaZ; 06-20-2019 at 07:20 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,949

    Re: Formula not working but should :)

    Welcome to the forum!

    There is not much chance of us being able to help from just a screenshot - sorry. Usually if a lookup can't find something, it means that they are not an exact match - check for leading and trailing spaces in your data.

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

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

    Re: Formula not working but should :)

    Also, you are trying to compare a single cell (A8) with a range of cells using the IF, and that won't work - you will need to use COUNTIF or VLOOKUP.

    You may also need to include apostrophes around the sheet name within the INDIRECT term.

    As Ali says, attach a sample workbook.

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    06-20-2019
    Location
    Serbia
    MS-Off Ver
    2016
    Posts
    6

    Re: Formula not working but should :)

    Thanks Ali.
    Last edited by SasaZ; 06-20-2019 at 06:42 AM.

  5. #5
    Registered User
    Join Date
    06-20-2019
    Location
    Serbia
    MS-Off Ver
    2016
    Posts
    6

    Re: Formula not working but should :)

    Thanks Pete. I attached sample. I was using exactly the same formula before and it was working as expected. For this sheet, it is not working for some reason.

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

    Re: Formula not working but should :)

    I don't see an attachment, but to do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Don't try to use the Paperclip icon, as it does not work on this forum.

    Hope this helps.

    Pete

  7. #7
    Registered User
    Join Date
    06-20-2019
    Location
    Serbia
    MS-Off Ver
    2016
    Posts
    6

    Re: Formula not working but should :)

    Sorry, I was just uploaded another better sample. When you open attached excel file, sheet "CC Tips", Column F should have values instead of #N/A. Thanks

  8. #8
    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,939

    Re: Formula not working but should :)

    What exactly are you trying to do here?

    I would probably go with sumifS for this, but start simple using actual sheet refs so you can test to make sure you are getting the answer you need. Then get fancy and add in the INDIRECT to find the relevant sheet name.

    From what I can make out, this would be the basis of your formula...
    =SUMIFS('ST2'!$F$4:$F$223,'ST2'!C4:C107,$C4,'ST2'!B4:B107,$B4)

    From this though, I can see that you have no EE 1 that also matches Host, so that will not sum anything.

    Once you have that part working, then you can add in the other criteria...
    =IF(OR($B4="server",$B4="host",$B4="runner"),SUMIFS('ST2'!$F$4:$F$223,'ST2'!C4:C107,$C4,'ST2'!B4:B107,$B4),"")
    Then finally add in the INDIRECT

    Start small, test, expand 1 small part, test, expand etc.
    Creating a complex formula like that, without taking that approach can make it very hard to evaluate - which part is not working, and which part (if any) IS working?
    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

  9. #9
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Formula not working but should :)

    I haven't tried the formula above and agree with the logical, but think the ranges should be an equal length
    =SUMIFS('ST2'!$F$4:$F$223,'ST2'!C4:C107,$C4,'ST2'!B4:B107,$B4)

    Although I could be wrong!

  10. #10
    Registered User
    Join Date
    06-20-2019
    Location
    Serbia
    MS-Off Ver
    2016
    Posts
    6

    Re: Formula not working but should :)

    Hey davsth. I already resolved that issue and wanted to post here so others users can see it. You are right, range was different and wasn't working as expected. They should be equal. Thank you for your reply

  11. #11
    Registered User
    Join Date
    06-20-2019
    Location
    Serbia
    MS-Off Ver
    2016
    Posts
    6

    Re: Formula not working but should :)

    FDibins. I tried testing part by part and the problem was when I use IF without SUM, IF only catches first value in range and I was completely stuck and didn't know that. Once I tested with SUM(IF all started working as expected. Also, range was not equal and that was the main issue. Thanks for your reply.

  12. #12
    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,939

    Re: Formula not working but should :)

    Happy to help 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. Format a part of a text working with only value not working with formula result
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2017, 05:41 AM
  2. [SOLVED] help index and match macro not working but formula working??
    By JEAN1972 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-28-2016, 06:37 AM
  3. Replies: 3
    Last Post: 05-14-2015, 07:32 AM
  4. Correct/Working (Index,Match) formula not working between cells
    By barnerd in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 02-11-2014, 01:20 PM
  5. Replies: 9
    Last Post: 03-08-2013, 11:50 AM
  6. Replies: 2
    Last Post: 08-17-2012, 08:16 AM
  7. Replies: 2
    Last Post: 08-01-2012, 11:53 AM

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