Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8766837
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:38:58+00:00 2026-06-13T16:38:58+00:00

I have just about no experience messing around with formulas in Excel, but I’m

  • 0

I have just about no experience messing around with formulas in Excel, but I’m trying to hack something together for someone who can’t get their macros to work.

Essentially, I’ve done a sort list of a set of data, and need to grab the top four items. Using VLookup or Index seems to make the most sense, but the way the table is formatted (which for various reasons I can’t change) it doesn’t seem like I’ll be able to get them to work (if I could switch the column/row definitions in them, then I could, but I’m not sure if I can/how). So anyway, I’ve got this long nested if statement I’ve thrown together that should do the trick, but it’s throwing me a 509 error for a missing element. I’ve done just about everything I could think of to figure out what’s going on, with no luck.

So here it is:

=IF(AO2=13, D2, IF(AP2=13, E2, IF(AQ2=13, F2, IF(AR2=13, G2, IF(AS2=13, H2, IF(AT2=13, I2, IF(AU2=13, J2, IF(AV2=13, K2, IF(AW2=13, L2, IF(AX1=13, M2, IF(AY2=13, N2, IF(AZ2=13, O2, IF(BA2=13, P2, "foo")))))))))))))

where the A02… values are the sort list (so index number 13 corresponds to the highest value in D2:P2) and the D2… is the corresponding value list I want it to return.

I was wondering if somebody could take a quick look and see if anything jumps out at them. I’m sure it’s stupid and/or structural, but I can’t get it working.

P.S. – I’m using Calc on a .xlsx file, but I’m pretty sure that should make no difference.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:39:01+00:00Added an answer on June 13, 2026 at 4:39 pm

    The first thing I see is that your formula is referencing

    IF(AX1=13, M2,
    

    Where I’m sure you probably mean:

    IF(AX2=13, M2,
    

    But this can be made MUCH more efficient – One of the easiest ways to do this (and there are MANY) would be the SUMIF function.
    Given that only one value in AO2:BA2 will equal 13, you could write something like:

    =SUMIF(AO2:BA2,13,D2:P2)
    

    But, like I said, there are MANY ways you can get this solution – It depends on what you’re trying to accomplish…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have just learnt about temporary tables and using them has given me some
I have tried just about everything for getting the Kinect for Windows to actually
I have just started reading about ORMLite since I am interested in using it
I have just switched from svn to mercurial and have read some tutorials about
I have just started using android, and have about 5 layout files finished. However,
So we have a database column that can contain just about anything. Unicode, numbers,
I just have a few questions about programmatically adding controls in aspx . After
I just have a quick question about how to get the length of a
So I just have posted a question about this code (which was answered): $(document).ready(Main);
Just wondering about some practice about this; I have made a simple visual C#

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.