ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   IF or VLOOKUP? (https://www.excelbanter.com/excel-worksheet-functions/18227-if-vlookup.html)

Dave E

IF or VLOOKUP?
 
I have a spreadsheet with a column of ingredients, and another column with
the percentages of each, not necessarily in order. Would I be able to
express the list elsewhere in the sheet but listing the greatest amount of
ingredient first, followed by the next greatest etc.?
Thanks
Dave Eastham



Bob Phillips

Dave,

Something like, assuming the original list in A1:B10

H1: =LARGE($A$1:$A$10,ROW())
J1: =INDEX($B$1:$B$10,MATCH(H1,$A$1:$A$10,0))
and copy down

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Dave E" wrote in message
...
I have a spreadsheet with a column of ingredients, and another column with
the percentages of each, not necessarily in order. Would I be able to
express the list elsewhere in the sheet but listing the greatest amount of
ingredient first, followed by the next greatest etc.?
Thanks
Dave Eastham





Bob Phillips

H1: =LARGE($C$1:$C$10,ROW())
J1: =INDEX($D$1:$D$10,MATCH(H1,$C$1:$C$10,0))
and copy down

--

HTH

RP
(remove nothere from the email address if mailing direct)

"Dave E" wrote in message


Bob
Works fine if I put figures in the columns you suggest, but in my existing
spreadsheet the numbers are in column C, and the names in column D. When I
substitute into the formula I just keep getting #NUM.
Thanks again
Dave E



"Bob Phillips" wrote in message
...
Dave,

Something like, assuming the original list in A1:B10

H1: =LARGE($A$1:$A$10,ROW())
J1: =INDEX($B$1:$B$10,MATCH(H1,$A$1:$A$10,0))
and copy down

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Dave E" wrote in message "Dave E"

wrote in message
...
I have a spreadsheet with a column of ingredients, and another column

with
the percentages of each, not necessarily in order. Would I be able to
express the list elsewhere in the sheet but listing the greatest

amount of
ingredient first, followed by the next greatest etc.?
Thanks
Dave Eastham






All times are GMT +1. The time now is 11:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com