Please help with formulas generating values a fixed distance from the large value in a set of data

Waboku

New Member
Joined
Jul 8, 2016
Messages
45
Hello,

I am having a problem with something for my work. I would really appreciate someones help if anyone knows how to do the following. Please consider. I would like to use a formula in 3 cells to generate the value a certain distance from the largest value in a set of data. For example:

<style>table { }td { padding-top: 1px; padding-right: 1px; padding-left: 1px; color: black; font-size: 12pt; font-weight: 400; font-style: normal; text-decoration: none; font-family: Calibri,sans-serif; vertical-align: bottom; border: medium none; white-space: nowrap; }</style>
Product Name

<colgroup><col style="width:65pt" width="65"> </colgroup><tbody>
</tbody>
Prices (Columns B to AE)
Quantities (Columns AF to BI)
Large Price
Large Quantity
Price to the left of the Large Price
Quantity to the left of the large quantity
Name 1
A number in each cell
A number in each cell
=Large(B2:AE2,1)
?
?
?

<tbody>
</tbody>

I would like, formulas for the cells with the ?'s,

The large quantity cell is the value 30 cells to the right of the large price from the prices columns not the large price column.

The price to the left of the large price cell is the value one cell to the left of the large price from the prices columns.

The quantity to the left of the large quantity cell is the value 29 cells to the right of the large price from the prices columns.

Thanks
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Have a look at the Index and Match functions ...

=MATCH(LARGE(B2:AE2,1),B2:AE2,) will return the position of the largest value in B2:AE2, e.g. if C2 (the 2nd cell in the range) is the largest value, then the MATCH function will return 2.

Then: =INDEX(AF2:BI2,MATCH(LARGE(B2:AE2,1),B2:AE2,)) will find the corresponding (i.e. 2nd) value in the range AF2:BI2.

To go left one cell, simply subtract 1 from the result of the MATCH().

But ...

- Is there any possibility that the maximum value is the first cell, i.e. you can't take the value one to the left?

- Do you need to allow for the possibility of duplicate maximum values?
 
Upvote 0
Hello,

I think I got what I need to work using the match and index functions. I inserted blank columns for when the maximum value is in the first cell. When there are duplicates of the largest value I would like Excel to use the value closer to the left. I think it does that automatically.
 
Upvote 0

Forum statistics

Threads
1,215,651
Messages
6,126,029
Members
449,281
Latest member
redwine77

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top