|
ChinChiller



Registered: 07/03/10
Posts: 3,270
|
Excel VBA help
#19126792 - 11/12/13 02:47 PM (10 years, 3 months ago) |
|
|
I have two data sets with corresponding identification numbers in one column of each set of data (4 or 5 columns on both sides of the spread sheet make up each data set). There are missing ids and duplicates. I need some code to sort both sets according to the corresponding id numbers in two columns, shifting the rows to match eachother.
|
memes
Blessed



Registered: 01/11/05
Posts: 27,785
Loc: In a Tree
|
|
you want to run a Vlookup (I think, guessing from your description). google how to do it and keep in mind that formatting is everything in getting it to work
|
ChinChiller



Registered: 07/03/10
Posts: 3,270
|
Re: Excel VBA help [Re: memes]
#19126870 - 11/12/13 03:05 PM (10 years, 3 months ago) |
|
|
I get the vlookup part but actually shifting the data doesnt seem so simple
|
pwnasaurus
Stranger



Registered: 07/16/08
Posts: 12,317
Loc: Canada
|
|
Are you saying that you want to do a sort on the ID column but sort the entire row together?
|
memes
Blessed



Registered: 01/11/05
Posts: 27,785
Loc: In a Tree
|
|
highlight the top row, hold down alt and then press "D F F" (while holding alt) and it'll make your top row sortable. then, you can sort as you wish.
Control + C to copy Alt + E S V (hold alt, press ESV in sequence) to "Paste plain text" wherever you're trying to move it to
again - i'm not sure if this exactly what you need, as i can't see it and can't truly conceptualize your dilemma in my head (sorry, after work, brain turned off)
|
ChinChiller



Registered: 07/03/10
Posts: 3,270
|
Re: Excel VBA help [Re: memes]
#19127249 - 11/12/13 04:20 PM (10 years, 3 months ago) |
|
|


I have these two sets of data on one spreadsheet. Basically 6,000 student entries in the first picture and some test scores in the second picture. The test scores were selected at random 8 for each classroom, not for every student. They need to be lined up so the student number in column F lines up with the student ID in Column U without messing up the other data, just organizing it.
|
ChinChiller



Registered: 07/03/10
Posts: 3,270
|
|
I know I could do it with a loop, I just dont have any experience coding in visual basic. Any pointers/help/snidbits of code would be very much appreciated!
|
memes
Blessed



Registered: 01/11/05
Posts: 27,785
Loc: In a Tree
|
|
two sets of data on one spreadsheet? no wonder your shits all fucked up.
i'd move one block of data over to a new spreadsheet and work with them individually.
|
ChinChiller



Registered: 07/03/10
Posts: 3,270
|
Re: Excel VBA help [Re: memes]
#19127423 - 11/12/13 04:52 PM (10 years, 3 months ago) |
|
|
Quote:
memes said: two sets of data on one spreadsheet? no wonder your shits all fucked up.
i'd move one block of data over to a new spreadsheet and work with them individually.
Would it be easier to do the loop if it was in a different file?
|
memes
Blessed



Registered: 01/11/05
Posts: 27,785
Loc: In a Tree
|
|
glhf man.
sorry
|
|