Hi Folks,
This may sound easy but it has stumped me.
I have a list of max values at the end of a row of 48 columns. I want to
find that max value within the row and then copy and paste the header (first
row) for the column the max value appears within. I cannot use a LOOKUP
function as the data is not sorted and has too many fields to use an if
statement.
Cheers,
RunsWithKnives
Hi!
Row 1 are column headers, A1:AV1
A2:AV2 = values
AW2 = =MAX(A2:AV2)
Find the corresponding header:
=INDEX(A$1:AV$1,MATCH(AW2,A2:AV2,0))
If there are duplicate max values the hearder for the first match (left to
right) will be returned.
Biff
quot;RunsWithKnivesquot; gt; wrote in message
...
gt; Hi Folks,
gt; This may sound easy but it has stumped me.
gt; I have a list of max values at the end of a row of 48 columns. I want to
gt; find that max value within the row and then copy and paste the header
gt; (first
gt; row) for the column the max value appears within. I cannot use a LOOKUP
gt; function as the data is not sorted and has too many fields to use an if
gt; statement.
gt;
gt; Cheers,
gt; RunsWithKnives
Hey Cheers Biff,
that does the trick and I don't have to punt about with macros.
Thanks a bunch,
RunsWithKnivesquot;Biffquot; wrote:
gt; Hi!
gt;
gt; Row 1 are column headers, A1:AV1
gt;
gt; A2:AV2 = values
gt;
gt; AW2 = =MAX(A2:AV2)
gt;
gt; Find the corresponding header:
gt;
gt; =INDEX(A$1:AV$1,MATCH(AW2,A2:AV2,0))
gt;
gt; If there are duplicate max values the hearder for the first match (left to
gt; right) will be returned.
gt;
gt; Biff
gt;
gt; quot;RunsWithKnivesquot; gt; wrote in message
gt; ...
gt; gt; Hi Folks,
gt; gt; This may sound easy but it has stumped me.
gt; gt; I have a list of max values at the end of a row of 48 columns. I want to
gt; gt; find that max value within the row and then copy and paste the header
gt; gt; (first
gt; gt; row) for the column the max value appears within. I cannot use a LOOKUP
gt; gt; function as the data is not sorted and has too many fields to use an if
gt; gt; statement.
gt; gt;
gt; gt; Cheers,
gt; gt; RunsWithKnives
gt;
gt;
gt;
You're welcome. Thanks for the feedback!
Biff
quot;RunsWithKnivesquot; gt; wrote in message
news
gt; Hey Cheers Biff,
gt; that does the trick and I don't have to punt about with macros.
gt;
gt; Thanks a bunch,
gt;
gt; RunsWithKnives
gt;
gt;
gt; quot;Biffquot; wrote:
gt;
gt;gt; Hi!
gt;gt;
gt;gt; Row 1 are column headers, A1:AV1
gt;gt;
gt;gt; A2:AV2 = values
gt;gt;
gt;gt; AW2 = =MAX(A2:AV2)
gt;gt;
gt;gt; Find the corresponding header:
gt;gt;
gt;gt; =INDEX(A$1:AV$1,MATCH(AW2,A2:AV2,0))
gt;gt;
gt;gt; If there are duplicate max values the hearder for the first match (left
gt;gt; to
gt;gt; right) will be returned.
gt;gt;
gt;gt; Biff
gt;gt;
gt;gt; quot;RunsWithKnivesquot; gt; wrote in
gt;gt; message
gt;gt; ...
gt;gt; gt; Hi Folks,
gt;gt; gt; This may sound easy but it has stumped me.
gt;gt; gt; I have a list of max values at the end of a row of 48 columns. I want
gt;gt; gt; to
gt;gt; gt; find that max value within the row and then copy and paste the header
gt;gt; gt; (first
gt;gt; gt; row) for the column the max value appears within. I cannot use a LOOKUP
gt;gt; gt; function as the data is not sorted and has too many fields to use an if
gt;gt; gt; statement.
gt;gt; gt;
gt;gt; gt; Cheers,
gt;gt; gt; RunsWithKnives
gt;gt;
gt;gt;
gt;gt;
- Sep 10 Mon 2007 20:39
Macro to find copy quot;headerquot; and paste
close
全站熱搜
留言列表
發表留言