Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6555399
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:48:56+00:00 2026-05-25T12:48:56+00:00

I want to take columns from an excel worksheet and then sort them. Let

  • 0

I want to take columns from an excel worksheet and then sort them. Let say I have a column A with value a,b,c,d,e,f and another column B with value 3,5,6,1,5,6. I want to sort both columns A and B using the values of column B. I’m not sound in VBA. So I got stuck to get the two column and sort them out from excel sheet. Bubble sort is enough for me right now.

enter image description here

I wanna sort Column A and B using value of B

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T12:48:57+00:00Added an answer on May 25, 2026 at 12:48 pm

    This should do it:

    Range("A2:B10").Select
    Selection.Sort Key1:=Range("B:B"), Order1:=xlAscending
    

    To place sorted column A values in column C (leaving A undisturbed):

    Range("C2:C10").Value = Range("A2:A10").Value
    Range("B2:C10").Select
    Selection.Sort Key1:=Range("B:B"), Order1:=xlAscending
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have several files and I only want to take specific columns from it.
I have to Export to excel from my asp.net page.I want to take the
I want to take the text and value from selected and not selected elements
I have a column which can take any values from 0 to 100. Now
i am retrieving information from an excel sheet, i want to take the information
I have a grid where I want to take the text from that cell,
I have a data frame full from which I want to take the last
How do I copy a range of cells from Excel to Powerpoint. I want
I have a table with about 1000 records and 2000 columns. What I want
I have two separate tables both with user id columns uid . I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.