Hello!
I have a messy data problem I'm hoping for some help with. For a data analysis project, I've been scraping basic facebook user data resulting from a search (I'm aware of terms of service issues, and unfortunately the API won't cut it for what I'm doing). When the data gets dumped into excel it looks like this:
Picture1.png
And I'd like to get it transposed and sorted so it looks like this:
Picture2.png
I need each group of data to be transposed to rows, and because there are often several thousand groups of cells, I'd like to be able to do this without manually transposing each group. I've had success writing a macro that automatically copies and pastes>transpose each group, but I still have to highlight each group manually before pressing the hotkey for the macro, which means that it takes a couple hours, a red bull and hand cramps to transpose a longer list. Here's the really basic macro for transposing groups individually:
The real sticking point here is that the length of the groups of data/cells is variable. Sometimes there are four pieces of information in the group, sometimes three, sometimes two (excluding the "Add FriendMore Options" data which is, of course, removed). I've run this by a few excel wizards and they're stumped. I'd like to be able to tell the macro to find the next blank cell in column A, then highlight until the following blank cell, then perform the previously mentioned transpose function, but some serious googling hasn't resulted in any answers on how I might do this.Please Login or Register to view this content.
I'm open to other solutions to this problem too - it doesn't have to be a macro. Although I'll go ahead and note that the obvious scrape software answers to this (i.e. iMacros, Data Miner, etc.) aren't helpful due to some browser memory issues involved in scrolling to the bottom of FB results. But any help or ideas would be greatly appreciated!
Thanks,
Mike
Bookmarks