ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Groupuing User Requirement (https://www.excelbanter.com/excel-programming/437260-groupuing-user-requirement.html)

Atif

Groupuing User Requirement
 
Hi,

Source data is in following form, depending on the user reqirement, I want
to creat a Packate Code, i.e. Standard Desktop (A), Standard Desktop with
Monitor (B), Standard Laptop (C). Standared Laptop with Monitor (D)

Source:
A B
1 User Name Hardware
2 BILINSKI, JOHN Standard Desktop
3 Standard 17" Monitor
4 ZMIJOWSKYJ, MIKE Standard Laptop
5 MOORE, LIZ Standard Desktop
6 CHEUNG, JULIANA Standard Laptop with
Standard 17" Monitor

Result will be:
A B
10 BILINSKI, JOHN B
11 ZMIJOWSKYJ, MIKE C
12 MOORE, LIZ A
13 CHEUNG, JULIANA D

Regards

Atif

Rob van Gelder

Groupuing User Requirement
 
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


Atif

Groupuing User Requirement
 
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

.


Rob van Gelder

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

.



All times are GMT +1. The time now is 01:56 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com