Excel data segment

Posted on 2013-01-11
Medium Priority
Last Modified: 2013-01-11
I've got a lot of data in Excel and would like to divide them into segments according to 2 columns' value:

Asset                              No of product        Segment
> 1000000                >10                        Premium 1
> 1000000              >=10 & <100      Premium 2
> 1000000               >100                        Premium 3
>50000 & <=1000000      >10      Smart 1
>50000 & <=1000000       >=10 & <100      Smart 2
>50000 & <=1000000      >100      Smart 3
<=50000                                    >10       Normal 1
<=50000                               >=10 & <100      Normal 2
<=50000                                  >100      Normal 3

Are there any smart ways to lookup the segments?
Question by:hkgal
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
LVL 18

Expert Comment

ID: 38767137
Add a nested if statement with and AND operator and an OR operator that classifies them in a third column -
Copy your conditions on a separate location
You could get something like in C2

(substitute ; to , depending on your regional settings

assuming that column A holds the Asset values and B the No of Product and columns E and F hold the conditions for the classification

Instead of getting a very complicated nested if, maybe you can group together conditions
i.e. I see that from your data Premium 1, Normal 1 and Smart 1 change due to the first condition (Asset).  Can I have an excel with sample data?
LVL 18

Expert Comment

ID: 38767147
An easy way would be to color code these based on conditional formatting.
LVL 18

Expert Comment

ID: 38767155
What classification is obtained (segment) when No of product is equal to 100????
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 38767171
I am using Excel 2003, but when I used nested If function, it reach condition limit after 7 If function set..
LVL 18

Assisted Solution

xtermie earned 2000 total points
ID: 38767181
I broke down your conditions into two conditions
One that based on the Asset produces the Part A of the segment (premium, smart, normal) and one based on the No of product produces the Part B of the segment (1, 2, 3) and then concatenate the result in a final segment classification column.  Please see attached file with example.

Author Comment

ID: 38767232
will formula like sumproduct, match helps?
LVL 18

Accepted Solution

xtermie earned 2000 total points
ID: 38767272
sumproduct is a calculating function that multiplies corresponding components in the given arrays, and returns the sum of those products - dont think that it can be applied in your case.

Match is a lookup function that searches for a value in an array and returns the relative position of that item - dont think that it can be easily or very efficiently applied in your case.

Doesn't the provided formulas in the example file work for you?
You can hide the two columns if they are in the way :)
Sometimes it is better to break up the formula into two instead of creating very complex formulas and try to see the logic behind what you are trying to do.
Let me know if you have any other ideas so that I can try to help you out.

Author Closing Comment

ID: 38767337
Your comment helps!

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some code to ensure data integrity when using macros within Excel. Also included code that helps secure your data within an Excel workbook.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question