Rebecca 0 #1 January 12, 2005 Hi guys, It's been awhile, and I was never much for coding in the first place. But I know this shouldn't take much for some one who knows their stuff. I'm in Excel, with about 160 columns to sort individually. Don't want to manually of course. How do I write the macro to loop, sorting one column's range after the one to the left and so on? I've got the sort command and ranges covered, just don't know how to loop. Anyone who knows can feel fre to PM, or keep it here, in case others give a crap. you've got to ask yourself one question: 'Do I feel loquacious?' -- well do you, punk? Quote Share this post Link to post Share on other sites
Rebecca 0 #2 January 12, 2005 Bueller? Bueller? you've got to ask yourself one question: 'Do I feel loquacious?' -- well do you, punk? Quote Share this post Link to post Share on other sites
mnealtx 0 #3 January 12, 2005 I've not messed around with VB much...but I'm looking for a solution for ya!Mike I love you, Shannon and Jim. POPS 9708 , SCR 14706 Quote Share this post Link to post Share on other sites
Rebecca 0 #4 January 12, 2005 QuoteI've not messed around with VB much...but I'm looking for a solution for ya! You're an angel! I'm looking too, just so y'all know I'm trying to rescue myself while the cavalry's on the way. I'll let you know if I figure it out! Thanks! you've got to ask yourself one question: 'Do I feel loquacious?' -- well do you, punk? Quote Share this post Link to post Share on other sites
CrazyIvan 0 #5 January 12, 2005 Well, what you can do is to RECORD a new macro: Tools -> Macro -> Record New Macro So, you select the rows, columns, etc, then go DATA and click on SORT, save the macro and VOILA!!!__________________________________________ Blue Skies and May the Force be with you. Quote Share this post Link to post Share on other sites
Rebecca 0 #6 January 12, 2005 Thanks Ivan, but I need it to sort the columns independent of one another, and 160 columns is too many to go in the editor and specify each range. you've got to ask yourself one question: 'Do I feel loquacious?' -- well do you, punk? Quote Share this post Link to post Share on other sites
Slappie 9 #7 January 12, 2005 HEy Rebecca I'll make a deal with ya.. Show us the girls and you'll get some help "Find out just what any people will quietly submit to and you have found out the exact measure of injustice and wrong which will be imposed upon them." Quote Share this post Link to post Share on other sites
wildblue 4 #8 January 12, 2005 Should just be something like: Do do the sort thing here and move to next column Loop Until IsEmpty(ActiveCell.Offset(0, 1))it's like incest - you're substituting convenience for quality Quote Share this post Link to post Share on other sites
Rebecca 0 #9 January 12, 2005 Wahoo! I got it! Thanks Wildblue and the rest of y'all! Slappie, nice try dude! Here it is if anyone needs anything similar: Dim col As Range Range("Your Range Here").Select For Each col In Selection.Columns Intersect(col, Selection, ActiveSheet.UsedRange). _ Sort Key1:=col, Order1:=xlDescending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom Next you've got to ask yourself one question: 'Do I feel loquacious?' -- well do you, punk? Quote Share this post Link to post Share on other sites
Slappie 9 #10 January 12, 2005 QuoteWahoo! I got it! Thanks Wildblue and the rest of y'all! Slappie, nice try dude! *Stomps around in a fit of frustration!* GDI!! It was a valiant attempt! You have to admit I almost got you to post us some boobage pics! "Find out just what any people will quietly submit to and you have found out the exact measure of injustice and wrong which will be imposed upon them." Quote Share this post Link to post Share on other sites
Rebecca 0 #11 January 12, 2005 Yeah, I was thisclose to PM'ing you my spectacular Weapons of Mass Distraction. Better luck next time! you've got to ask yourself one question: 'Do I feel loquacious?' -- well do you, punk? Quote Share this post Link to post Share on other sites
mnealtx 0 #12 January 12, 2005 Quotespectacular Weapons of Mass Distraction. Does that phrase make anyone else feel funny in their pants? Glad ya got it fixed, or working, or whatever it was.... I'm still distracted!Mike I love you, Shannon and Jim. POPS 9708 , SCR 14706 Quote Share this post Link to post Share on other sites
jsaxton 0 #13 January 12, 2005 export it as csv and it's easy to do in Perl ;) Quote Share this post Link to post Share on other sites
happythoughts 0 #14 January 12, 2005 (Sigh) Is there a reason that we are educating these women? They still just depend on men to help them. They should be fixing me a nice sammich. (I just amuse myself so much some days) Quote Share this post Link to post Share on other sites
Rebecca 0 #15 January 12, 2005 BWAHAHAHAHA!! Yeah, times ain't what they used to be. We're wearing shoes, not breeding, making reservations for dinner, and voting too. Get out now, it's all downhill from here! Uppity bitches... edit: Dammit, I want a nice sammich, too! Hey Slappie! Go make me and Bill some sammiches! [Stewie] And no onions! God help you if I find onion! [/Stewie] you've got to ask yourself one question: 'Do I feel loquacious?' -- well do you, punk? Quote Share this post Link to post Share on other sites
Rebecca 0 #16 January 12, 2005 WOOHOO!! I made Mike feel funny in his pants!! "Hey, what's going on down there?" Butters, South Park, LOTR episode you've got to ask yourself one question: 'Do I feel loquacious?' -- well do you, punk? Quote Share this post Link to post Share on other sites
mnealtx 0 #17 January 12, 2005 Mike I love you, Shannon and Jim. POPS 9708 , SCR 14706 Quote Share this post Link to post Share on other sites
happythoughts 0 #18 January 12, 2005 Voting? When did that become a good eye-dear? I knew something was up when Kerry was spending $300 on a hairdo. If it was only men voting, he'd be down at Clip-and-Save spending four-fittee like the rest of us. If they had a real man to love 'em, they'd be happier doing that than voting. Quote Share this post Link to post Share on other sites
Rebecca 0 #19 January 12, 2005 QuoteI knew something was up when Kerry was spending $300 on a hairdo. If it was only men voting, he'd be down at Clip-and-Save spending four-fittee like the rest of us. But, but lustrous hair and expensive grooming are essential traits of a good leader! As well as how good-looking and athletic he is! Nah, if it was ONLY men voting, they'd just whip 'em out, measure 'em, weigh the boys, and go with the winner. QuoteIf they had a real man to love 'em, they'd be happier doing that than voting. Luckily, voting only took about 30 minutes out of my life this year, just long enough for him to start the laundry and fix me a sammich before I got back home. you've got to ask yourself one question: 'Do I feel loquacious?' -- well do you, punk? Quote Share this post Link to post Share on other sites
Slappie 9 #20 January 12, 2005 [QUOTE]Luckily, voting only took about 30 minutes out of my life this year, just long enough for him to start the laundry and fix me a sammich before I got back home.[/QUOTE] [B]ZIIINNNNGGGGGGGGGGGG!! OUCH!![/B] "Find out just what any people will quietly submit to and you have found out the exact measure of injustice and wrong which will be imposed upon them." Quote Share this post Link to post Share on other sites
happythoughts 0 #21 January 12, 2005 QuoteNah, if it was ONLY men voting, they'd just whip 'em out, measure 'em, weigh the boys, and go with the winner. Simplifying the process to the essentials would make more sense. We'd get the same quality in elected officials too. Of course, I'm thinking that women would be watching more political debates. QuoteLuckily, voting only took about 30 minutes out of my life this year, just long enough for him to start the laundry and fix me a sammich before I got back home. Dayum... you must be spending more time on the lovin' than you did voting if he's doing that. I promise that if you support me well, I will stay home and do most of the laundry. Quote Share this post Link to post Share on other sites Rebecca 0 #22 January 12, 2005 QuoteOf course, I'm thinking that women would be watching more political debates. Ron Jeremy for President!!! QuoteDayum... you must be spending more time on the lovin' than you did voting if he's doing that. I promise that if you support me well, I will stay home and do most of the laundry. Tee hee! Well, I DO keep my man happy.... Just kidding though - we share the housework. He messes it up, and I hire a housekeeper. Works out beautifully. (If you read this honey, I'm just playin'! ) you've got to ask yourself one question: 'Do I feel loquacious?' -- well do you, punk? Quote Share this post Link to post Share on other sites Join the conversation You can post now and register later. If you have an account, sign in now to post with your account. Note: Your post will require moderator approval before it will be visible. 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. Insert image from URL × Desktop Tablet Phone Submit Reply 0
Rebecca 0 #22 January 12, 2005 QuoteOf course, I'm thinking that women would be watching more political debates. Ron Jeremy for President!!! QuoteDayum... you must be spending more time on the lovin' than you did voting if he's doing that. I promise that if you support me well, I will stay home and do most of the laundry. Tee hee! Well, I DO keep my man happy.... Just kidding though - we share the housework. He messes it up, and I hire a housekeeper. Works out beautifully. (If you read this honey, I'm just playin'! ) you've got to ask yourself one question: 'Do I feel loquacious?' -- well do you, punk? Quote Share this post Link to post Share on other sites