Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
hailah
 
Posts: n/a
Default how do i "de-dupe?" rows by a column value?

I have a complex operation to perform. My spreadsheet has rows that indicate
items (control number in column A) linked to titles (control number in column
B). A title can have multiple items in the spredsheet. I want to number the
titles and assign random numbers to them so that I can get two random
samples.

I also want to have my random numbering retained in the spreadsheet as a
whole, so I can see all the items assigned to my samples.

How can I "dedupe" column B, assign a random number to each title control,
then transfer that data to my "undeduped" spreadsheet (or have it
retained...)?

I found an article describing a way to assign the random numbers
(http://tutorialized.com/tutorial/Sel...-in-Excel/7197);
it's how to apply this only to the title controls, one per title control,
that I don't know. Someone described how to do this in another statistical
package, I just don't know what to do with Excel. Help, please!
  #2   Report Post  
hailah
 
Posts: n/a
Default

In case anyone is interested, I figured out how to do what I wanted - without
"deduping"... using If function.

Realize that the key to the item/title relationship is another column, call
it V, call number.

First, to assign random numbers to the titles... sort spreadsheet by call
number column V, so all the rows with same title control are together.
Create a new column next to title control column B, with If function such
that if title control is the same as the one above it, value is "V",
otherwise value is RAND().

Copy that column, past over it as values only (to set the random values so
they don't recalculate every time).

Sort spreadsheet by the new column (C), ascending so all the random numbers
are at the top and V's at the bottom. Create another column to the side of
it (D) and label (and count if desired, by using data fill handle) the number
of randomly selected titles I want. I did two samples and then left the rest
blank.

Re-sort the spreadsheet by call number. Now the titles in the sample are
labeled, but I want the row with volumes of the same title also to be
labeled. Right now they're blank.

Create a new column (E) next to the sample label column, all with formula.
In E2:

=If C2<"V",D2,E1

Was sure this wasn't going to work but it correctly copied the labels on my
samples and labeled the associated volume rows. Now I can "fix" the values
in column E, delete D and use it instead.

Whew! Thought I was going to have to write a macro for this one...



"hailah" wrote:

I have a complex operation to perform. My spreadsheet has rows that indicate
items (control number in column A) linked to titles (control number in column
B). A title can have multiple items in the spredsheet. I want to number the
titles and assign random numbers to them so that I can get two random
samples.

I also want to have my random numbering retained in the spreadsheet as a
whole, so I can see all the items assigned to my samples.

How can I "dedupe" column B, assign a random number to each title control,
then transfer that data to my "undeduped" spreadsheet (or have it
retained...)?

I found an article describing a way to assign the random numbers
(http://tutorialized.com/tutorial/Sel...-in-Excel/7197);
it's how to apply this only to the title controls, one per title control,
that I don't know. Someone described how to do this in another statistical
package, I just don't know what to do with Excel. Help, please!

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
How do I sort by row instead of by column? PercivalMound Excel Worksheet Functions 7 August 28th 06 10:41 PM
moving alternating rows to a column with the order staying the sam Duke Carey Excel Discussion (Misc queries) 0 April 27th 05 09:51 PM
MACRO - copy rows based on value in column to another sheet Michael A Excel Discussion (Misc queries) 1 March 5th 05 02:15 AM
every nth cell by columns not rows.... Sampson Excel Worksheet Functions 1 February 24th 05 06:03 AM
I want to delete rows with duplicate entries within one column. kini olegario Excel Discussion (Misc queries) 1 January 15th 05 01:44 AM


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