#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 71
Default Median continued

OK then. I'm going in circles on this.

I want to conditionally format the cell that contains the Median or closest
thereto.

I have a row of cells in different currencies eg

a b c d e f
1 USD GBP EUR CHF ZAR AUD
2 10000 13500 17000 8500 12500 4500 Base Currency
3 1 1.54 1.27 .84 .1 .66
Conversion rate to USD
4 10000 20847 21613 7175 1232 2956 Converted to USD

=median(a4:f4) results in 8587 which does not appear in row 4

In another method which uses multiple rows, I subtract the median from the
actual value and square the result to remove any negatives. Then the min of
that is closest to the median and therefore the answer.

But I want to do this in one cell as a conditional format behind A4 to F4.

Any help deeply appreciated!!

Best regards,
Bony




I want to normalise these to a single currency (USD) so as to determine the
Median


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Median continued

No need to use a cell to do the calculation.

Use the "Formula is" option of the CF, with A4 as the active cell, and use the formula

=OR(A4=LARGE($A$4:$F$4,COUNT($A$4:$F$4)/2),IF(MOD(COUNT($A$4:$F$4),2)=0,A4=LARGE($A$4:$F$4 ,COUNT($A$4:$F$4)/2+1),FALSE))

This works because the median is either the average of the two middle values (if there are an even
number of values) or the middle number (if there are an odd number of values).

HTH,
Bernie
MS Excel MVP


"Bony Pony" wrote in message
...
OK then. I'm going in circles on this.

I want to conditionally format the cell that contains the Median or closest
thereto.

I have a row of cells in different currencies eg

a b c d e f
1 USD GBP EUR CHF ZAR AUD
2 10000 13500 17000 8500 12500 4500 Base Currency
3 1 1.54 1.27 .84 .1 .66
Conversion rate to USD
4 10000 20847 21613 7175 1232 2956 Converted to USD

=median(a4:f4) results in 8587 which does not appear in row 4

In another method which uses multiple rows, I subtract the median from the
actual value and square the result to remove any negatives. Then the min of
that is closest to the median and therefore the answer.

But I want to do this in one cell as a conditional format behind A4 to F4.

Any help deeply appreciated!!

Best regards,
Bony




I want to normalise these to a single currency (USD) so as to determine the
Median




  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 71
Default Median continued

Bernie,
You're my hero! Anytime you are near Aldershot, Hampshire - ping me a mail
- I owe you a beer for that! Great solution thanks!

Bony

"Bernie Deitrick" wrote:

No need to use a cell to do the calculation.

Use the "Formula is" option of the CF, with A4 as the active cell, and use the formula

=OR(A4=LARGE($A$4:$F$4,COUNT($A$4:$F$4)/2),IF(MOD(COUNT($A$4:$F$4),2)=0,A4=LARGE($A$4:$F$4 ,COUNT($A$4:$F$4)/2+1),FALSE))

This works because the median is either the average of the two middle values (if there are an even
number of values) or the middle number (if there are an odd number of values).

HTH,
Bernie
MS Excel MVP


"Bony Pony" wrote in message
...
OK then. I'm going in circles on this.

I want to conditionally format the cell that contains the Median or closest
thereto.

I have a row of cells in different currencies eg

a b c d e f
1 USD GBP EUR CHF ZAR AUD
2 10000 13500 17000 8500 12500 4500 Base Currency
3 1 1.54 1.27 .84 .1 .66
Conversion rate to USD
4 10000 20847 21613 7175 1232 2956 Converted to USD

=median(a4:f4) results in 8587 which does not appear in row 4

In another method which uses multiple rows, I subtract the median from the
actual value and square the result to remove any negatives. Then the min of
that is closest to the median and therefore the answer.

But I want to do this in one cell as a conditional format behind A4 to F4.

Any help deeply appreciated!!

Best regards,
Bony




I want to normalise these to a single currency (USD) so as to determine the
Median





  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Median continued

Can't you just email me one? ;-)

Thanks for letting me know that my solution worked for you.

Bernie
MS Excel MVP


Anytime you are near Aldershot, Hampshire - ping me a mail
- I owe you a beer for that! Great solution thanks!



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Median continued

A few keystrokes shorter:

=ABS(MEDIAN($A4:$F4)-A4)=MIN(ABS($A4:$F4-MEDIAN($A4:$F4)))

--
Biff
Microsoft Excel MVP


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
No need to use a cell to do the calculation.

Use the "Formula is" option of the CF, with A4 as the active cell, and use
the formula

=OR(A4=LARGE($A$4:$F$4,COUNT($A$4:$F$4)/2),IF(MOD(COUNT($A$4:$F$4),2)=0,A4=LARGE($A$4:$F$4 ,COUNT($A$4:$F$4)/2+1),FALSE))

This works because the median is either the average of the two middle
values (if there are an even number of values) or the middle number (if
there are an odd number of values).

HTH,
Bernie
MS Excel MVP


"Bony Pony" wrote in message
...
OK then. I'm going in circles on this.

I want to conditionally format the cell that contains the Median or
closest
thereto.

I have a row of cells in different currencies eg

a b c d e f
1 USD GBP EUR CHF ZAR AUD
2 10000 13500 17000 8500 12500 4500 Base Currency
3 1 1.54 1.27 .84 .1 .66
Conversion rate to USD
4 10000 20847 21613 7175 1232 2956 Converted to USD

=median(a4:f4) results in 8587 which does not appear in row 4

In another method which uses multiple rows, I subtract the median from
the
actual value and square the result to remove any negatives. Then the min
of
that is closest to the median and therefore the answer.

But I want to do this in one cell as a conditional format behind A4 to
F4.

Any help deeply appreciated!!

Best regards,
Bony




I want to normalise these to a single currency (USD) so as to determine
the
Median








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 71
Default Median continued

Aargh!! There are SO many ways to do something in Excel!

LOL - Many many thanks and a beer for each of you is in the mail :)

"T. Valko" wrote:

A few keystrokes shorter:

=ABS(MEDIAN($A4:$F4)-A4)=MIN(ABS($A4:$F4-MEDIAN($A4:$F4)))

--
Biff
Microsoft Excel MVP


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
No need to use a cell to do the calculation.

Use the "Formula is" option of the CF, with A4 as the active cell, and use
the formula

=OR(A4=LARGE($A$4:$F$4,COUNT($A$4:$F$4)/2),IF(MOD(COUNT($A$4:$F$4),2)=0,A4=LARGE($A$4:$F$4 ,COUNT($A$4:$F$4)/2+1),FALSE))

This works because the median is either the average of the two middle
values (if there are an even number of values) or the middle number (if
there are an odd number of values).

HTH,
Bernie
MS Excel MVP


"Bony Pony" wrote in message
...
OK then. I'm going in circles on this.

I want to conditionally format the cell that contains the Median or
closest
thereto.

I have a row of cells in different currencies eg

a b c d e f
1 USD GBP EUR CHF ZAR AUD
2 10000 13500 17000 8500 12500 4500 Base Currency
3 1 1.54 1.27 .84 .1 .66
Conversion rate to USD
4 10000 20847 21613 7175 1232 2956 Converted to USD

=median(a4:f4) results in 8587 which does not appear in row 4

In another method which uses multiple rows, I subtract the median from
the
actual value and square the result to remove any negatives. Then the min
of
that is closest to the median and therefore the answer.

But I want to do this in one cell as a conditional format behind A4 to
F4.

Any help deeply appreciated!!

Best regards,
Bony




I want to normalise these to a single currency (USD) so as to determine
the
Median







  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Median continued

Cheers!

--
Biff
Microsoft Excel MVP


"Bony Pony" wrote in message
...
Aargh!! There are SO many ways to do something in Excel!

LOL - Many many thanks and a beer for each of you is in the mail :)

"T. Valko" wrote:

A few keystrokes shorter:

=ABS(MEDIAN($A4:$F4)-A4)=MIN(ABS($A4:$F4-MEDIAN($A4:$F4)))

--
Biff
Microsoft Excel MVP


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
No need to use a cell to do the calculation.

Use the "Formula is" option of the CF, with A4 as the active cell, and
use
the formula

=OR(A4=LARGE($A$4:$F$4,COUNT($A$4:$F$4)/2),IF(MOD(COUNT($A$4:$F$4),2)=0,A4=LARGE($A$4:$F$4 ,COUNT($A$4:$F$4)/2+1),FALSE))

This works because the median is either the average of the two middle
values (if there are an even number of values) or the middle number (if
there are an odd number of values).

HTH,
Bernie
MS Excel MVP


"Bony Pony" wrote in message
...
OK then. I'm going in circles on this.

I want to conditionally format the cell that contains the Median or
closest
thereto.

I have a row of cells in different currencies eg

a b c d e f
1 USD GBP EUR CHF ZAR AUD
2 10000 13500 17000 8500 12500 4500 Base Currency
3 1 1.54 1.27 .84 .1 .66
Conversion rate to USD
4 10000 20847 21613 7175 1232 2956 Converted to
USD

=median(a4:f4) results in 8587 which does not appear in row 4

In another method which uses multiple rows, I subtract the median from
the
actual value and square the result to remove any negatives. Then the
min
of
that is closest to the median and therefore the answer.

But I want to do this in one cell as a conditional format behind A4 to
F4.

Any help deeply appreciated!!

Best regards,
Bony




I want to normalise these to a single currency (USD) so as to
determine
the
Median









  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 71
Default Median continued

Hi Biff,
Not trying to sound ungrateful but ...

your suggested solution returns a TRUE for every cell in range a4:f4. I
tried variations of it but still couldn't get it working properly. Sorry. :)

Best regards,
Bony

"T. Valko" wrote:

Cheers!

--
Biff
Microsoft Excel MVP


"Bony Pony" wrote in message
...
Aargh!! There are SO many ways to do something in Excel!

LOL - Many many thanks and a beer for each of you is in the mail :)

"T. Valko" wrote:

A few keystrokes shorter:

=ABS(MEDIAN($A4:$F4)-A4)=MIN(ABS($A4:$F4-MEDIAN($A4:$F4)))

--
Biff
Microsoft Excel MVP


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
No need to use a cell to do the calculation.

Use the "Formula is" option of the CF, with A4 as the active cell, and
use
the formula

=OR(A4=LARGE($A$4:$F$4,COUNT($A$4:$F$4)/2),IF(MOD(COUNT($A$4:$F$4),2)=0,A4=LARGE($A$4:$F$4 ,COUNT($A$4:$F$4)/2+1),FALSE))

This works because the median is either the average of the two middle
values (if there are an even number of values) or the middle number (if
there are an odd number of values).

HTH,
Bernie
MS Excel MVP


"Bony Pony" wrote in message
...
OK then. I'm going in circles on this.

I want to conditionally format the cell that contains the Median or
closest
thereto.

I have a row of cells in different currencies eg

a b c d e f
1 USD GBP EUR CHF ZAR AUD
2 10000 13500 17000 8500 12500 4500 Base Currency
3 1 1.54 1.27 .84 .1 .66
Conversion rate to USD
4 10000 20847 21613 7175 1232 2956 Converted to
USD

=median(a4:f4) results in 8587 which does not appear in row 4

In another method which uses multiple rows, I subtract the median from
the
actual value and square the result to remove any negatives. Then the
min
of
that is closest to the median and therefore the answer.

But I want to do this in one cell as a conditional format behind A4 to
F4.

Any help deeply appreciated!!

Best regards,
Bony




I want to normalise these to a single currency (USD) so as to
determine
the
Median










  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 71
Default Median continued

Ah! it works as an array formula!

However, I don't believe ctrl sh enter works in conditional formula ...

"T. Valko" wrote:

Cheers!

--
Biff
Microsoft Excel MVP


"Bony Pony" wrote in message
...
Aargh!! There are SO many ways to do something in Excel!

LOL - Many many thanks and a beer for each of you is in the mail :)

"T. Valko" wrote:

A few keystrokes shorter:

=ABS(MEDIAN($A4:$F4)-A4)=MIN(ABS($A4:$F4-MEDIAN($A4:$F4)))

--
Biff
Microsoft Excel MVP


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
No need to use a cell to do the calculation.

Use the "Formula is" option of the CF, with A4 as the active cell, and
use
the formula

=OR(A4=LARGE($A$4:$F$4,COUNT($A$4:$F$4)/2),IF(MOD(COUNT($A$4:$F$4),2)=0,A4=LARGE($A$4:$F$4 ,COUNT($A$4:$F$4)/2+1),FALSE))

This works because the median is either the average of the two middle
values (if there are an even number of values) or the middle number (if
there are an odd number of values).

HTH,
Bernie
MS Excel MVP


"Bony Pony" wrote in message
...
OK then. I'm going in circles on this.

I want to conditionally format the cell that contains the Median or
closest
thereto.

I have a row of cells in different currencies eg

a b c d e f
1 USD GBP EUR CHF ZAR AUD
2 10000 13500 17000 8500 12500 4500 Base Currency
3 1 1.54 1.27 .84 .1 .66
Conversion rate to USD
4 10000 20847 21613 7175 1232 2956 Converted to
USD

=median(a4:f4) results in 8587 which does not appear in row 4

In another method which uses multiple rows, I subtract the median from
the
actual value and square the result to remove any negatives. Then the
min
of
that is closest to the median and therefore the answer.

But I want to do this in one cell as a conditional format behind A4 to
F4.

Any help deeply appreciated!!

Best regards,
Bony




I want to normalise these to a single currency (USD) so as to
determine
the
Median










  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Median continued

It should work in the CF without entry with Cntrl-Shift-Enter

HTH,
Bernie
MS Excel MVP


Ah! it works as an array formula!

However, I don't believe ctrl sh enter works in conditional formula ...

"T. Valko" wrote:

=ABS(MEDIAN($A4:$F4)-A4)=MIN(ABS($A4:$F4-MEDIAN($A4:$F4)))





  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Median continued

Formulas used in conditional formatting and in data validation are
automatically processed as arrays so you don't have to array enter them in
the refedits (those little boxes in dialogue forms).

--
Biff
Microsoft Excel MVP


"Bony Pony" wrote in message
...
Ah! it works as an array formula!

However, I don't believe ctrl sh enter works in conditional formula ...

"T. Valko" wrote:

Cheers!

--
Biff
Microsoft Excel MVP


"Bony Pony" wrote in message
...
Aargh!! There are SO many ways to do something in Excel!

LOL - Many many thanks and a beer for each of you is in the mail :)

"T. Valko" wrote:

A few keystrokes shorter:

=ABS(MEDIAN($A4:$F4)-A4)=MIN(ABS($A4:$F4-MEDIAN($A4:$F4)))

--
Biff
Microsoft Excel MVP


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
No need to use a cell to do the calculation.

Use the "Formula is" option of the CF, with A4 as the active cell,
and
use
the formula

=OR(A4=LARGE($A$4:$F$4,COUNT($A$4:$F$4)/2),IF(MOD(COUNT($A$4:$F$4),2)=0,A4=LARGE($A$4:$F$4 ,COUNT($A$4:$F$4)/2+1),FALSE))

This works because the median is either the average of the two
middle
values (if there are an even number of values) or the middle number
(if
there are an odd number of values).

HTH,
Bernie
MS Excel MVP


"Bony Pony" wrote in message
...
OK then. I'm going in circles on this.

I want to conditionally format the cell that contains the Median or
closest
thereto.

I have a row of cells in different currencies eg

a b c d e f
1 USD GBP EUR CHF ZAR AUD
2 10000 13500 17000 8500 12500 4500 Base
Currency
3 1 1.54 1.27 .84 .1 .66
Conversion rate to USD
4 10000 20847 21613 7175 1232 2956 Converted
to
USD

=median(a4:f4) results in 8587 which does not appear in row 4

In another method which uses multiple rows, I subtract the median
from
the
actual value and square the result to remove any negatives. Then
the
min
of
that is closest to the median and therefore the answer.

But I want to do this in one cell as a conditional format behind A4
to
F4.

Any help deeply appreciated!!

Best regards,
Bony




I want to normalise these to a single currency (USD) so as to
determine
the
Median












  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 71
Default Median continued

Thanks again guys! I can honestly say that I didn't know about automatic
array entry in CF. I just assumed that as it wouldn't accept the Ctrl Sh
Enter ... well you know ...

Isn't learning fun!

Best regards,
Bony

"Bony Pony" wrote:

Ah! it works as an array formula!

However, I don't believe ctrl sh enter works in conditional formula ...

"T. Valko" wrote:

Cheers!

--
Biff
Microsoft Excel MVP


"Bony Pony" wrote in message
...
Aargh!! There are SO many ways to do something in Excel!

LOL - Many many thanks and a beer for each of you is in the mail :)

"T. Valko" wrote:

A few keystrokes shorter:

=ABS(MEDIAN($A4:$F4)-A4)=MIN(ABS($A4:$F4-MEDIAN($A4:$F4)))

--
Biff
Microsoft Excel MVP


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
No need to use a cell to do the calculation.

Use the "Formula is" option of the CF, with A4 as the active cell, and
use
the formula

=OR(A4=LARGE($A$4:$F$4,COUNT($A$4:$F$4)/2),IF(MOD(COUNT($A$4:$F$4),2)=0,A4=LARGE($A$4:$F$4 ,COUNT($A$4:$F$4)/2+1),FALSE))

This works because the median is either the average of the two middle
values (if there are an even number of values) or the middle number (if
there are an odd number of values).

HTH,
Bernie
MS Excel MVP


"Bony Pony" wrote in message
...
OK then. I'm going in circles on this.

I want to conditionally format the cell that contains the Median or
closest
thereto.

I have a row of cells in different currencies eg

a b c d e f
1 USD GBP EUR CHF ZAR AUD
2 10000 13500 17000 8500 12500 4500 Base Currency
3 1 1.54 1.27 .84 .1 .66
Conversion rate to USD
4 10000 20847 21613 7175 1232 2956 Converted to
USD

=median(a4:f4) results in 8587 which does not appear in row 4

In another method which uses multiple rows, I subtract the median from
the
actual value and square the result to remove any negatives. Then the
min
of
that is closest to the median and therefore the answer.

But I want to do this in one cell as a conditional format behind A4 to
F4.

Any help deeply appreciated!!

Best regards,
Bony




I want to normalise these to a single currency (USD) so as to
determine
the
Median










  #13   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Median continued

Isn't learning fun!

You betcha! :)

--
Biff
Microsoft Excel MVP


"Bony Pony" wrote in message
...
Thanks again guys! I can honestly say that I didn't know about automatic
array entry in CF. I just assumed that as it wouldn't accept the Ctrl Sh
Enter ... well you know ...

Isn't learning fun!

Best regards,
Bony

"Bony Pony" wrote:

Ah! it works as an array formula!

However, I don't believe ctrl sh enter works in conditional formula ...

"T. Valko" wrote:

Cheers!

--
Biff
Microsoft Excel MVP


"Bony Pony" wrote in message
...
Aargh!! There are SO many ways to do something in Excel!

LOL - Many many thanks and a beer for each of you is in the mail :)

"T. Valko" wrote:

A few keystrokes shorter:

=ABS(MEDIAN($A4:$F4)-A4)=MIN(ABS($A4:$F4-MEDIAN($A4:$F4)))

--
Biff
Microsoft Excel MVP


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
No need to use a cell to do the calculation.

Use the "Formula is" option of the CF, with A4 as the active cell,
and
use
the formula

=OR(A4=LARGE($A$4:$F$4,COUNT($A$4:$F$4)/2),IF(MOD(COUNT($A$4:$F$4),2)=0,A4=LARGE($A$4:$F$4 ,COUNT($A$4:$F$4)/2+1),FALSE))

This works because the median is either the average of the two
middle
values (if there are an even number of values) or the middle
number (if
there are an odd number of values).

HTH,
Bernie
MS Excel MVP


"Bony Pony" wrote in message
...
OK then. I'm going in circles on this.

I want to conditionally format the cell that contains the Median
or
closest
thereto.

I have a row of cells in different currencies eg

a b c d e f
1 USD GBP EUR CHF ZAR AUD
2 10000 13500 17000 8500 12500 4500 Base
Currency
3 1 1.54 1.27 .84 .1 .66
Conversion rate to USD
4 10000 20847 21613 7175 1232 2956 Converted
to
USD

=median(a4:f4) results in 8587 which does not appear in row 4

In another method which uses multiple rows, I subtract the median
from
the
actual value and square the result to remove any negatives. Then
the
min
of
that is closest to the median and therefore the answer.

But I want to do this in one cell as a conditional format behind
A4 to
F4.

Any help deeply appreciated!!

Best regards,
Bony




I want to normalise these to a single currency (USD) so as to
determine
the
Median












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
Missing Threads - continued ShaneDevenshire Excel Discussion (Misc queries) 0 June 6th 07 09:29 PM
If then statement continued! Add to distribution list without opening Excel Discussion (Misc queries) 1 October 20th 06 11:02 PM
two-variable calculations continued ... fredonic Excel Discussion (Misc queries) 2 November 17th 05 05:43 PM
Continued Column titles Radish Excel Discussion (Misc queries) 1 July 14th 05 03:41 PM
unhide personal.xls ..... continued excelchallenged Excel Discussion (Misc queries) 0 June 15th 05 07:17 PM


All times are GMT +1. The time now is 01:07 PM.

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

About Us

"It's about Microsoft Excel"