• 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
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

XLOOKUP and search from last to next cell with value|General Excel Questions & Answers|Excel Forum|My Online Training Hub

You are here: Home / XLOOKUP and search from last to next cell with value|General Excel Questions & Answers|Excel Forum|My Online Training Hub

vba course banner

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…XLOOKUP and search from last to nex…
sp_PrintTopic sp_TopicIcon
XLOOKUP and search from last to next cell with value
Avatar
Anders Kongsli

New Member
Members
Level 0
Forum Posts: 1
Member Since:
May 12, 2021
sp_UserOfflineSmall Offline
1
May 12, 2021 - 10:38 pm
sp_Permalink sp_Print sp_EditHistory

Please, see the attached picture. I've tried to explain what I'm trying to do. But I'm stuck. 

1) I want the first table (named "S_RS") to show the correct win-loss record (W-L) (in the column named "W-L") for each starting pitcher for the Boston Red Sox in the 2021 MLB regular season. The first table summarizes the data in the second table below. The second table is named "GL_RS". 

2) I have tried to use the XLOOKUP-function but it will only return the last or next to last input. The formula I have used is the following:

=xlookup(S_RS[@[Starting pitchers]],GL_RS[Starting pitcher],GL_RS[W-L],””,1,-1)

But as you can see for example for Eovaldi in his last two games (game 37 and 32) he didn't get a decision (win or loss for his team since one of the relive pitchers earned it). I want the formula to find Eovaldi's last game (game 37), check for a decision (W or L) and if there is none, then look for the last time he earned a decision (here: game 27 and return 4-2). 

I hope someone out there knows the solution. 

Pitching-W-L.pngImage Enlarger

sp_PlupAttachments Attachments
  • sp_PlupImage Pitching-W-L.png (337 KB)
Avatar
Anders Sehlstedt
Eskilstuna, Sweden

VIP
Members


Trusted Members
Level 3
Forum Posts: 873
Member Since:
December 7, 2016
sp_UserOfflineSmall Offline
2
May 14, 2021 - 4:48 pm
sp_Permalink sp_Print

Hello,

As this is your first post you might have missed the forum rules, but as stated you should add a sample workbook instead of a picture, this is probably the main reason to why no one has answered to your post already.

Attach your workbook containing the data and/or macro you are having an issue with. I can't stress this enough. Don't type in lots of data or code. We don't have time to recreate the workbooks.

With that said, if you can upload a sample workbook we can play around and hopefully find a working solution.

Br,
Anders

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Misael Gutierrez Sr.
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 873
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 222
Jessica Stewart: 218
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Cathi Giard
Sarah Young
Henry Delgado
Alita Nieuwoudt
KL KOH
Joao Marques
Regi Hampton
Taffie Elliott
Paramita Chakraborty
David du Toit
Forum Stats:
Groups: 3
Forums: 24
Topics: 6358
Posts: 27805

 

Member Stats:
Guest Posters: 49
Members: 32335
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.