Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / September 2005

Tip: Looking for answers? Try searching our database.

Retuning a column number for a specific value

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
slot guy - 13 Sep 2005 18:31 GMT
I'm trying to figure out how to have a formula return the column number from
a maximum value in a row. I've tried using =column(max(a1:c1)) to return the
column number but it errors out. Can anyone offer a suggestion?

Thanks
bj - 13 Sep 2005 18:41 GMT
try
=sumproduct(--(range =max(range)),Column(range)

note if there can be several equal maxs this won't work.

in this case try
=match(max(range),range,0)+(column number at start of range)-1

> I'm trying to figure out how to have a formula return the column number from
> a maximum value in a row. I've tried using =column(max(a1:c1)) to return the
> column number but it errors out. Can anyone offer a suggestion?
>
> Thanks
slot guy - 13 Sep 2005 22:47 GMT
bj,
Thank you for the formula. I uesed the first one since I'm looking for
unique date with no repeats. Can you please tell me what the "--" does in the
function? Also, I don't understand how the column number is actualy returned
using the column function. The function description just states that "column"
returns the column number of a reference. It doesn't ask for any criteria to
use to pick from a reference. Can you explain?

> try
> =sumproduct(--(range =max(range)),Column(range)
[quoted text clipped - 9 lines]
> >
> > Thanks
Harlan Grove - 13 Sep 2005 22:54 GMT
bj wrote...
...
>note if there can be several equal maxs this won't work.
>
>in this case try
>=match(max(range),range,0)+(column number at start of range)-1
...

Or

=COLUMN(INDEX(range,MATCH(MAX(range),range,0)))
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.