Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Finding Max Within 3 Columns

For each row I need to determine which of 3 columns has the max numbe
of hours and then populate Column A with the appropriate indicator.

Example of desired results:


MaxHours INVESTMENT CORE MISC
CORE 80 100 3

I am new to Excel macros/VBA and would appreciate any assistance.

Thanks,

Clare Marie
:cool

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Finding Max Within 3 Columns

Hi
a non VBA solution. Put the following formula in cell A2
=INDEX($B$1:$D$1,1,MATCH(MAX(B2:D2),B2:D2,0))
and copy this down

--
Regards
Frank Kabel
Frankfurt, Germany


For each row I need to determine which of 3 columns has the max

number
of hours and then populate Column A with the appropriate indicator.

Example of desired results:


MaxHours INVESTMENT CORE MISC
CORE 80 100 3

I am new to Excel macros/VBA and would appreciate any assistance.

Thanks,

Clare Marie
cool:



---
Message posted from http://www.ExcelForum.com/


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Finding Max Within 3 Columns

Thanks for the solution. It works perfectly for what I asked.

However, now I find that I need to populate ColA with just a one-lette
Indicator based on the Column name which contained the maximum amoun
of hours, not the Column name itself

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Finding Max Within 3 Columns

Hi
could you explain the logic behind this one-letter indicator?

--
Regards
Frank Kabel
Frankfurt, Germany


Thanks for the solution. It works perfectly for what I asked.

However, now I find that I need to populate ColA with just a
one-letter Indicator based on the Column name which contained the
maximum amount of hours, not the Column name itself.


---
Message posted from http://www.ExcelForum.com/

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Finding Max Within 3 Columns

Hi Frank,

The 3 Columns containing hours a

Core, Investment, and KPHC

Based on which column contains max hours, Col A will contain
either a 'C', 'I' or 'K' (using first letter of the column name).

This logic is needed in addition to the formula you provided in you
first post.

Many thanks for your continued help.

Clare Mari

--
Message posted from http://www.ExcelForum.com



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Finding Max Within 3 Columns

Hi
use
=LEFT(INDEX($B$1:$D$1,1,MATCH(MAX(B2:D2),B2:D2,0)) ,1)

--
Regards
Frank Kabel
Frankfurt, Germany


Hi Frank,

The 3 Columns containing hours a

Core, Investment, and KPHC

Based on which column contains max hours, Col A will contain
either a 'C', 'I' or 'K' (using first letter of the column name).

This logic is needed in addition to the formula you provided in your
first post.

Many thanks for your continued help.

Clare Marie


---
Message posted from http://www.ExcelForum.com/

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Finding Max Within 3 Columns

This works great and I used the instructions from the 'Help
documentation to propagate this formula for the entire column, with th
exception of the header cell. It works but gives me an N/A in th
Indicator Column if the row isn't populated.

Is there a more effective way of inserting a formula throughout th
column which would keep the cell empty rather than populate it with a
N/A?


Thanks,

Clare Mari

--
Message posted from http://www.ExcelForum.com

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
Finding matches in two columns Erik Excel Worksheet Functions 4 April 26th 10 03:32 AM
Finding E-mails in different columns and trying to put them in one James Excel Worksheet Functions 1 February 11th 09 12:21 PM
Finding a calculated Value across Columns Nigel Wallis Excel Worksheet Functions 2 August 27th 08 08:28 PM
Finding entries across columns bollard Excel Worksheet Functions 2 May 6th 08 03:04 PM
Finding a match in several columns Keren Excel Worksheet Functions 3 May 26th 05 02:32 PM


All times are GMT +1. The time now is 01:15 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"