Formula to include INDIRECT function

Hi,
Could someone please modify the below formula or provide a new one. I may have placed the INDIRECT in the wrong place.

=SMALL(INDIRECT("AV"&P4&":AV"&Q4),INDEX(FREQUENCY(INDIRECT("AV"&P4&":AV"&Q4),0),1))

Assuming values are in cells P4 and Q4 and referring to values in column AV

Thanks

Ian
Ian BellretiredAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bill PrewIT / Software Engineering ConsultantCommented:
I can't deduce what the correction might be with knowing what you are trying to do.  Can you provide a sample of the data and the desired results.

I typically break down longer formulas in a text editor when building them to help get parens and args in the proper place.  It looks like you haven't violated any of the parms, but hard to know if you have the right values in the right places without knowing the goal.

I broke your formula down as follows:

SMALL(
  INDIRECT("AV"&P4&":AV"&Q4),
  INDEX(
    FREQUENCY(
      INDIRECT("AV"&P4&":AV"&Q4),
      0
    ),
    1
  )
)

Open in new window


»bp
1
NorieAnalyst Assistant Commented:
What is the formula meant to do and what do the values in P4 and Q4 represent?

PS Bill, I do something similar when working with long, complicated formulas by using ALT+ENTER in the Formula bar.
1
Ian BellretiredAuthor Commented:
I'm trying to find the minimum value in a range.
example
The minimum value in below range is 14
AV1  20
AV2  30
AV3  14
AV4   40
The ROW range is shown in cells   P4   1    Q4  4  (P4 & Q4 are only cells where data range is input.)
The formula looks up column AV and determines the smallest value
between rows AV1 and  AV4
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Bill PrewIT / Software Engineering ConsultantCommented:
Working based on cells in original formula, then maybe this?

=MIN(INDIRECT("AV"&P4&":AV"&Q4))

Open in new window


»bp
0
Ian BellretiredAuthor Commented:
Bill, sorry I forgot to add that I wanted to exclude zero values so I modified it to the following
=MIN(INDIRECT("AV"&P4&":AV"&Q4),">0")
but got a "VALUE" error
0
Bill PrewIT / Software Engineering ConsultantCommented:
Okay, hence the use of SMALL, give this a try then:

=SMALL(INDIRECT("AV"&P4&":AV"&Q4),COUNTIF(INDIRECT("AV"&P4&":AV"&Q4),0)+1)

Open in new window


»bp
1

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ian BellretiredAuthor Commented:
Thanks Bill, You've excelled again
Ian
0
Bill PrewIT / Software Engineering ConsultantCommented:
Welcome.


»bp
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.