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 7885241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:00:40+00:00 2026-06-03T05:00:40+00:00

Problem: This is for Excel 2010 It is rarely that I need to merge

  • 0

Problem:
This is for Excel 2010

It is rarely that I need to merge the result of multiple rows if they are have a common value (In this case is PN#), while there are a few column similar but not the same (description and Name), while the quantity at different columns are automatically summed. However, it is nice to have such ability.

This can be done using SUMIF multiple time
Explain expected result:

enter image description here

Available resource:
How to SUM / merge similar rows in Excel using VBA?

When the macro run, I would like to:
1. Specified the range, include the header
2. Choose the main column that uses to compare the name (PN#)
3. Choose the columns that will not be summed but just simple choose the first occurrence (Description and Name)
4. The other columns will be summed
5. Choose where I Can put the result table

What have I tried/done:

  1. I am able to get the range from selection. But wish I could do something like Excel has to select the range

enter image description here

  1. Inputboxes to let user choose which column to be used to compare, which columns to choose the first occurrence of PN#, and which columns to be summed.

My main question is to how to merge the rows?

  • 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-06-03T05:00:41+00:00Added an answer on June 3, 2026 at 5:00 am

    As far as I am aware, the built-in range dialog cannot be used. However, you can use an InputBox to ask for a range, e.g.

    dim rRange as Range
    Set rRange = Application.InputBox("Please choose a range", "Specify Range", Type:=8)
    

    To caption your label afterwards, you can use something like:

    lblYourLabel.Caption = rRange.Address
    

    You may want to add some error handling to it and consult the manual on InputBox, but this should get you started.

    Hope that helps,
    Stefan

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

To recreate this problem: Create an Excel workbook (.xlsx). I'm using Excel 2010, but
I have a vba function in excel 2010 that I built using help from
Can I have multiple threads in Excel. I need a counter to show the
I really need help with this one. I have written an adding that adds
I have a problem with a VBA Add-in in Excel 2010. I've created some
This is a very common problem when Excel Worksheet or Chart is embedded into
I have this pattern written ^.*\.(?!jpg$|png$).+$ However there is a problem - this pattern
i am a beginner and i have a problem : this code doesnt compile
This problem has bugged me so many times and i have now decided to
We have an application that is built with Excel as the front end using

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.