• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
    • Password Reset
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

ability to get an N/A using sumifs formula|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / ability to get an N/A using sumifs formula|General Excel Questions & Answers|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumGeneral Excel Questions & Answe…ability to get an N/A using sumifs …
sp_PrintTopic sp_TopicIcon
ability to get an N/A using sumifs formula
Avatar
Natasha Ernst

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
January 7, 2022
sp_UserOfflineSmall Offline
1
January 28, 2022 - 1:40 am
sp_Permalink sp_Print

I am trying to look up a variable by driver number based on multiple criteria, therefore I was using a sumifs formula.  If the driver number doesn't exist in the source data, we want to look at the driver number minus 1 (and then minus 2 and minus 3) because of the way our system replaces drivers and re-numbers them.  Our original file was able to use a vlookup because it looked for only one criteria. In that instance we used the following ifna formula.

=IFNA(VLOOKUP(C2,'Advantage Driver Ind'!A:D,4,FALSE),(IFNA((VLOOKUP((LEFT(C2,10)&(RIGHT(C2,1)-1)),'Advantage Driver Ind'!A:D,4,FALSE)),(IFNA((VLOOKUP((LEFT(C2,10)&(RIGHT(C2,1)-2)),'Advantage Driver Ind'!A:D,4,FALSE)),(VLOOKUP((LEFT(C2,10)&(RIGHT(C2,1)-3)),'Advantage Driver Ind'!A:D,4,FALSE)))))))

Now, however, the indicator we want back (either a 0 or 1) is within multiple variables so we have to look it up by ID number (C2) AND description (Advantage Driver Ind).  I can't figure out how to get the sumifs to to keep the first value it finds because it's returning a 0 value even if it doesn't find that criteria.  This is the formula I have currently, however this one keeps looking until it finds a 1.  I need it to only keep looking if there is no value for that ID number (driver) and description.  

=IF(SUMIFS('Auto Driver Variables'!D:D,'Auto Driver Variables'!A:A,C1134,'Auto Driver Variables'!I:I,"ADVANTAGE DRIVER IND")=1,SUMIFS('Auto Driver Variables'!D:D,'Auto Driver Variables'!A:A,C1134,'Auto Driver Variables'!I:I,"ADVANTAGE DRIVER IND"),IF(SUMIFS('Auto Driver Variables'!D:D,'Auto Driver Variables'!A:A,(LEFT(C1134,10)&RIGHT(C1134,1)-1),'Auto Driver Variables'!I:I,"ADVANTAGE DRIVER IND")=1,SUMIFS('Auto Driver Variables'!D:D,'Auto Driver Variables'!A:A,(LEFT(C1134,10)&RIGHT(C1134,1)-1),'Auto Driver Variables'!I:I,"ADVANTAGE DRIVER IND"),IF(SUMIFS('Auto Driver Variables'!D:D,'Auto Driver Variables'!A:A,(LEFT(C1134,10)&RIGHT(C1134,1)-2),'Auto Driver Variables'!I:I,"ADVANTAGE DRIVER IND")=1,SUMIFS('Auto Driver Variables'!D:D,'Auto Driver Variables'!A:A,(LEFT(C1134,10)&RIGHT(C1134,1)-2),'Auto Driver Variables'!I:I,"ADVANTAGE DRIVER IND"),IF(SUMIFS('Auto Driver Variables'!D:D,'Auto Driver Variables'!A:A,(LEFT(C1134,10)&RIGHT(C1134,1)-3),'Auto Driver Variables'!I:I,"ADVANTAGE DRIVER IND")=1,SUMIFS('Auto Driver Variables'!D:D,'Auto Driver Variables'!A:A,(LEFT(C1134,10)&RIGHT(C1134,1)-1),'Auto Driver Variables'!I:I,"ADVANTAGE DRIVER IND"),0))))

So to recap, if there is a matching driver number and description, I need it to pull back the 0 or 1 from the source data, however, if there is no matching driver number and description, I need the formula to look for the original driver number minus 1, then if there is no match for that, minus 2, and then so on to minus 3.  Is there a way to do this with the sumifs formula or is there another option for querying by multiple variables that would work better?

Thanks so much for your help!

sp_AnswersTopicSeeAnswer See Answer
Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 870
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
2
January 28, 2022 - 8:02 am
sp_Permalink sp_Print

Hello,

If you can upload a sample file with some dummy data along with a mockup of the expected result that would be of great help for all.

Br,
Anders

Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 612
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
3
January 28, 2022 - 7:41 pm
sp_Permalink sp_Print

Which version of Excel do you have?

Avatar
Natasha Ernst

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
January 7, 2022
sp_UserOfflineSmall Offline
4
January 29, 2022 - 2:02 am
sp_Permalink sp_Print

Attached is a sample file of the new formula and original formula.  We are on Office 16.  Thanks for your help!

Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 870
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
5
January 30, 2022 - 9:21 pm
sp_Permalink sp_Print sp_EditHistory

Hello,

Do you want something like this? Below formula gives #N/A if no match is found, else it pulls the indicator value for that driver. Might be that you need to finish the formula with CTRL + SHIFT + ENTER for it to work. See attached copy, sheet Formulas (2).

=INDEX('Auto Driver Variables-new'!$C$2:$C$43,MATCH(1;('Auto Driver Variables-new'!$A$2:$A$43='Formulas'!A2)*('Auto Driver Variables-new'!$D$2:$D$43="ADVANTAGE DRIVER IND"),0))

Br,
Anders

sp_AnswersTopicAnswer
Answers Post
Avatar
Natasha Ernst

Active Member
Members
Level 0
Forum Posts: 4
Member Since:
January 7, 2022
sp_UserOfflineSmall Offline
6
February 1, 2022 - 7:32 am
sp_Permalink sp_Print

Thank you for the response! I didn't even think of Index/Match (probably because I dislike that formula and usually avoid it at all costs).  🙂

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Laxmi Praveen
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 870
Purfleet: 412
Frans Visser: 346
David_Ng: 306
lea cohen: 219
A.Maurizio: 202
Jessica Stewart: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
yashal minahil
Oluwadamilola Ogun
Yannik H
dectator mang
Francis Drouillard
Orlando Inocente
Jovitha Clemence
Maloxat Axmatovna
Ricardo Freitas
Marko Meglic
Forum Stats:
Groups: 3
Forums: 24
Topics: 6201
Posts: 27185

 

Member Stats:
Guest Posters: 49
Members: 31861
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.