Solved

Create Unique List in excel

Posted on 2011-03-02
21
207 Views
Last Modified: 2012-05-11
I have a list of 1's or 0's in column H2:H27. and a list of 3 digit codes in column i. I want to create a list of 3 digit codes in column j only if the number in column H is a 1.

Is there a way to do this without code?
0
Comment
Question by:bryanscott53
  • 7
  • 5
  • 3
  • +3
21 Comments
 
LVL 24

Expert Comment

by:jimyX
ID: 35019855
Assume you are at row one, you can put formula in column j like this:

=if(H1=1,J1=I1,"")
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35019859
update:
=if(H1=1,I1,"")
0
 
LVL 5

Expert Comment

by:Pabilio
ID: 35019880
If you want to repeat the 3 digit numbers that are in Column I and put it in column J use this formula in J2 and Fill down:

=If(H2=1,I2,"")
0
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 12

Expert Comment

by:Gary Dewrell
ID: 35019891
In the J cell enter this

=if(H2=1,I2," ")

This says, for cell Jx, If Hx = 1 then fill this cell with the contents of Ix, if Hx does not =1 leave blank.
0
 
LVL 33

Expert Comment

by:jppinto
ID: 35019900
The simplest way of doing this is by using a pivot table like the attached example.

jppinto
Book1.xlsx
0
 

Author Comment

by:bryanscott53
ID: 35019916
JimyX thanks i should have made myself clearer. I dont want any blank rows in column j.
0
 
LVL 33

Expert Comment

by:jppinto
ID: 35019928
If I understood the question right, you want a list of unique 3 digits codes but only for thoose that have 1 in the other column, right? If so, pivot table is the simplest way of achieving that.
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35019943
So what to put in J if the number in H is not 1?
0
 
LVL 5

Expert Comment

by:Pabilio
ID: 35019945
Then change the "" in the formula for the value that you want there when there is 0 in column H.

0
 

Author Comment

by:bryanscott53
ID: 35020017
I have attached what i would like as a result, sorry using pivot table is not an option either as i am importing this into an xcelsius application
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35020036
please attach.
0
 

Author Comment

by:bryanscott53
ID: 35020048
sorry
example.xls
0
 
LVL 24

Expert Comment

by:jimyX
ID: 35020120
So column "Result" is copying column "Code" if column "in use" is 1?
But you are not following that as a rule?
What is the rule that you apply here please?
0
 
LVL 33

Expert Comment

by:jppinto
ID: 35020121
What about using the Autofilter and select only 1's on column A?
0
 

Author Comment

by:bryanscott53
ID: 35020184
JimmyX sorry not sure what you mean? I only want the code in column J if there is a 1 in column i.

jppinto, thanks i did think of auto filter but dont want to remember to have to do this manually (the 1's and 0's are updated automatically from another source). I am trying to create an automated process.
0
 
LVL 24

Accepted Solution

by:
StephenJR earned 500 total points
ID: 35020233
Perhaps this array formula in D2 and down? Enter with ctrl+shift+enter

=IF(ROWS(D$2:D2)<=COUNTIF($B$2:$B$9,1),INDEX($A$2:$A$9,SMALL(IF($B$2:$B$9=1,ROW($A$2:$A$9)-ROW($A$2)+1),ROWS(D$2:D2)),1),"")
0
 

Author Comment

by:bryanscott53
ID: 35020422
StephenJR this is great but Xcelsius does not support array formula's either.

i am not sure if this is going to be possible, thanks for everyones help I really appreciate it!
0
 
LVL 24

Expert Comment

by:StephenJR
ID: 35020435
Could you convert to values before exporting?
0
 

Author Comment

by:bryanscott53
ID: 35020670
StephenJR I have just checked and the 3 digit code column is always uniqe so no need to check for this. would that make a difference to you solution, could we avoid the array formual then?
0
 
LVL 24

Expert Comment

by:StephenJR
ID: 35020745
No, I don't think so. Could you not just sort the data and then all the 1s would be together at least?
0
 

Author Comment

by:bryanscott53
ID: 35020908
I could but was trying to get away with doing anything manually. I will use your CSE formula though and just copy and paste the values. thanks for this.
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VBA to apply same filter values to multiple tables in Excel 6 33
Excel Formula to split product code 5 16
Excel VBA 4 26
Merging spreadsheets 8 37
Introduction This Article is a follow-up to my Mappit! Addin Article (http://www.experts-exchange.com/A_2613.html), it was inspired by an email posting I made to EUSPRIG (http://www.eusprig.org/index.htm), I will briefly cover: 1) An overvie…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 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