Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MNF MNF is offline
external usenet poster
 
Posts: 2
Default Conditional formula(s) & labelling

I m using Excel 2002. My data looks like this:

a b c d
1 yellow Green Brown pink
2 16 12 14 15

I have used =max and =large formuli in another sheet (same workbook) to
display data in ascending order in a different table.

I also want to 'label' the data but can't work it out i.e. labelling 16
'yellow' using/adapting the above formuli. Also, in a seperate cell I have
looked at/tried: =If(a2b2,"yellow",if(a2c2,"yellow",if(a2d2,"yel low")))

Which works fine provided yellow is always the greatest value but get an
error when I include the other columns in the same formula i.e. after
if(a2d2,"yellow",if(b12a2,"green" etc etc.

Can anyone help resolve this? Thanks.


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Conditional formula(s) & labelling

I am not sure this is what you need, but we can find the max with MAX(); then
we locate the column with MATCH(); then we find the color with OFFSET():

=OFFSET(A1,0,MATCH(MAX(2:2),2:2,0)-1)

--
Gary''s Student - gsnu200786


"MNF" wrote:

I m using Excel 2002. My data looks like this:

a b c d
1 yellow Green Brown pink
2 16 12 14 15

I have used =max and =large formuli in another sheet (same workbook) to
display data in ascending order in a different table.

I also want to 'label' the data but can't work it out i.e. labelling 16
'yellow' using/adapting the above formuli. Also, in a seperate cell I have
looked at/tried: =If(a2b2,"yellow",if(a2c2,"yellow",if(a2d2,"yel low")))

Which works fine provided yellow is always the greatest value but get an
error when I include the other columns in the same formula i.e. after
if(a2d2,"yellow",if(b12a2,"green" etc etc.

Can anyone help resolve this? Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Conditional formula(s) & labelling

I'm assuming you want something like this:

12...Green
14...Brown
15...Pink
16...Yellow

Enter this formula in G1:

=SMALL(A$2:D$2,ROWS(G$1:G1))

Enter this formula in H1:

=INDEX(A$1:D$1,MATCH(G1,A$2:D$2,0))

Select both G1 and H1 and copy down to G4:H4

If there are any duplicate numbers this will not work properly and a
different approach will be needed.

--
Biff
Microsoft Excel MVP


"MNF" wrote in message
...
I m using Excel 2002. My data looks like this:

a b c d
1 yellow Green Brown pink
2 16 12 14 15

I have used =max and =large formuli in another sheet (same workbook) to
display data in ascending order in a different table.

I also want to 'label' the data but can't work it out i.e. labelling 16
'yellow' using/adapting the above formuli. Also, in a seperate cell I have
looked at/tried: =If(a2b2,"yellow",if(a2c2,"yellow",if(a2d2,"yel low")))

Which works fine provided yellow is always the greatest value but get an
error when I include the other columns in the same formula i.e. after
if(a2d2,"yellow",if(b12a2,"green" etc etc.

Can anyone help resolve this? Thanks.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MNF MNF is offline
external usenet poster
 
Posts: 2
Default Conditional formula(s) & labelling

Thanks very much. Your suggestion has sorted it out.

"T. Valko" wrote:

I'm assuming you want something like this:

12...Green
14...Brown
15...Pink
16...Yellow

Enter this formula in G1:

=SMALL(A$2:D$2,ROWS(G$1:G1))

Enter this formula in H1:

=INDEX(A$1:D$1,MATCH(G1,A$2:D$2,0))

Select both G1 and H1 and copy down to G4:H4

If there are any duplicate numbers this will not work properly and a
different approach will be needed.

--
Biff
Microsoft Excel MVP


"MNF" wrote in message
...
I m using Excel 2002. My data looks like this:

a b c d
1 yellow Green Brown pink
2 16 12 14 15

I have used =max and =large formuli in another sheet (same workbook) to
display data in ascending order in a different table.

I also want to 'label' the data but can't work it out i.e. labelling 16
'yellow' using/adapting the above formuli. Also, in a seperate cell I have
looked at/tried: =If(a2b2,"yellow",if(a2c2,"yellow",if(a2d2,"yel low")))

Which works fine provided yellow is always the greatest value but get an
error when I include the other columns in the same formula i.e. after
if(a2d2,"yellow",if(b12a2,"green" etc etc.

Can anyone help resolve this? Thanks.





  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Conditional formula(s) & labelling

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"MNF" wrote in message
...
Thanks very much. Your suggestion has sorted it out.

"T. Valko" wrote:

I'm assuming you want something like this:

12...Green
14...Brown
15...Pink
16...Yellow

Enter this formula in G1:

=SMALL(A$2:D$2,ROWS(G$1:G1))

Enter this formula in H1:

=INDEX(A$1:D$1,MATCH(G1,A$2:D$2,0))

Select both G1 and H1 and copy down to G4:H4

If there are any duplicate numbers this will not work properly and a
different approach will be needed.

--
Biff
Microsoft Excel MVP


"MNF" wrote in message
...
I m using Excel 2002. My data looks like this:

a b c d
1 yellow Green Brown pink
2 16 12 14 15

I have used =max and =large formuli in another sheet (same workbook) to
display data in ascending order in a different table.

I also want to 'label' the data but can't work it out i.e. labelling 16
'yellow' using/adapting the above formuli. Also, in a seperate cell I
have
looked at/tried:
=If(a2b2,"yellow",if(a2c2,"yellow",if(a2d2,"yel low")))

Which works fine provided yellow is always the greatest value but get
an
error when I include the other columns in the same formula i.e. after
if(a2d2,"yellow",if(b12a2,"green" etc etc.

Can anyone help resolve this? Thanks.







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I change cell labelling from R1C1 to A1? agua Excel Discussion (Misc queries) 2 November 19th 07 09:14 PM
CHARTS---X-Y labelling visafort53 Charts and Charting in Excel 1 July 10th 07 03:29 PM
Bar chart x axis labelling JRD Charts and Charting in Excel 1 December 20th 06 01:21 PM
Labelling at xy scattered chart kl Charts and Charting in Excel 1 December 18th 05 05:32 PM
Labelling a row so it can be used as an offset for sum, difference or range Martin Underwood Excel Discussion (Misc queries) 5 March 18th 05 04:37 PM


All times are GMT +1. The time now is 02:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"