View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder Rob van Gelder is offline
external usenet poster
 
Posts: 37
Default Groupuing User Requirement

Let's say your data is in two columns A and B.

Your data looks as follows:
User Name Hardware
BILINSKI, JOHN Standard Desktop
BILINSKI, JOHN Standard 17" Monitor
ZMIJOWSKYJ, MIKE Standard Laptop
MOORE, LIZ Standard Desktop
CHEUNG, JULIANA Standard Laptop
CHEUNG, JULIANA Standard 17" Monitor


Assuming that cell A10 contains your user name, use the following formula:

=CHOOSE(SUM(($A$2:$A$7=$A10) * (IF($B$2:$B$7="Standard 17"" Monitor", 1, IF($B$2:$B$7="Standard Desktop", 2, IF($B$2:$B$7="Standard Laptop", 4))))),
"", "A", "B", "C", "D")

It's an array formula, so use Ctrl+Shift+Enter when you enter the formula.

Cheers,
Rob


On 12-Dec-2009 04:37, Atif wrote:
Thank you Rob.

Names can not be repeated and I am looking for VBA solution.
If Names can be repeated Will you please share your idea.


"Rob van Gelder" wrote:

A problem is that the Person's name in column A is not repeated down.
Is there a possibility that you could repeat the name?

If so, the formula becomes quite easy.

Cheers,
Rob


On 11-Dec-2009 04:46, Atif wrote:
Standard 17" Monitor

.