Jump to content
IGNORED

boring Excel help question


Recommended Posts

Guest Coalbucket PI

It's a bit tricky to explain what the problem is which is why I haven't been able to find anything by googling.

 

I have a data set with a column of ID numbers, around 120,000 of them, with most of the ID numbers duplicated about 11 times. I have a separate database (the annotation file) of what these IDs correspond to, with a column for the IDs and a columns of what it represents.

 

What I need is a column in the data set, next to the ID number column, which contains the info about what each ID represents. Now the IDs in the annotation file are listed in the same order as they are in the data set, but without the duplicates, so that list is only about 12,000 long, and so I can't just copy it across.

 

Is there any way of doing this or am I wasting my time trying? This doesn't seem like it should be such a hard problem to solve but maybe it's beyond the scope of Excel. If anyone knows anything about anything have a punt!

Link to comment
https://forum.watmm.com/topic/67118-boring-excel-help-question/
Share on other sites

Guest Gary C

Sounds like the simplest way would be to delete the duplicates and then copy-paste the second document in, right?

 

I just did it, but I'm not sure how. Here goes;

 

Select the column entries top to bottom.

Data > Filter > Auto Filter (click)

Data > Filter > Advanced Filter

Select 'filter in list' and 'unique records only'. Okay

 

Done.

 

I think that works as long as your duplicates are displaced randomly about the list. I'm not sure it'll work the way you want if they're in order.

Edited by Gary C
Guest Gary C

LOL, fuck. Not a clue then.

 

Edit: Although, I wonder what would happen if you pasted the columns beside one another, and then did the duplicate sorting thing. If there are no duplicates in the second column it theoretically shouldn't be a problem.

 

Edit: I'm not sure if I really trust my method though. I'm just filling out random numbers and testing it myself, but I'm not sure I'd want to use this process for something real. With so much information it might be impossible to know for sure whether everything is in the right place.

Edited by Gary C
Guest Coalbucket PI

Yeah thats basically the problem with so many numbers, you can't check that it's done it right so you have to really have faith in what you're doing... easier said than done with fucking Excel. Thanks a lot for having a go though, I thought you might have cracked it for a bit there!

You'll need a vlookup, so that your new column has the following function:

 

If your ID is in cell A2, and your annotation table is in Sheet2 A1 to B12000 (and has two columns, IDnumber in the first and text in the second)

 

=VLOOKUP(A2,Sheet2!$A$1:$B$12000,2)

 

That should do the trick, just drag the equation down to the bottom and the A2 should change to A3, A4 etc. The '2' in the formula tells it to return the value in the second column of the annotation table.

 

Also the $'s just fix the reference to the annotation table, so that when you drag the equation down it doesn't automatically come down.

  On 6/28/2011 at 5:32 PM, Coalbucket PI said:

This VLOOKUP command looks like exactly what I want Jhonny, nice work! I'm getting a REF error at the moment but hopefully I can sort that out.

Just do a bit of playing. Your ID is numeric and in order yeah? It should work then

Guest Coalbucket PI
  On 6/28/2011 at 5:46 PM, jhonny said:
  On 6/28/2011 at 5:32 PM, Coalbucket PI said:

This VLOOKUP command looks like exactly what I want Jhonny, nice work! I'm getting a REF error at the moment but hopefully I can sort that out.

Just do a bit of playing. Your ID is numeric and in order yeah? It should work then

They are in order but not entirely numeric, I think that might be the problem now. Most of them are 7 digits followed by '_at'.

 

edit: maybe I want the LOOKUP one?

Edited by Coalbucket PI
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   1 Member

×
×