Sum Column B based on Column A using Excel VBA Macro

Rakesh Kamani

New Member
Joined
Feb 25, 2020
Messages
33
Office Version
  1. 2013
Platform
  1. Windows
There are 4 worksheets in the workbook. Command button in sheet 1, project name and actual hours in sheet 2, project name and planned hours based on month and year in sheet 3, final report display on sheet 4. (Name of project, actual hours and planned hours).

When I click on the Command button on Sheet 1, Report Display on Sheet 4 based on Sheet 2 and Sheet 3.

How to write a VBA in this case?

Thank you in advance.
 
I don't understand what the pattern is. I will assume that everything that does not start with "auto" or "total" is a project.
 
Upvote 0

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
I don't understand what the pattern is. I will assume that everything that does not start with "auto" or "total" is a project.
Yes Amor,
1)The project id is 7digit (stating first letter is alphabet or only number)
2)sheet2 project column is only ID, sheet3 project column is id+name
 
Upvote 0
I don't understand what the pattern is. I will assume that everything that does not start with "auto" or "total" is a project.
please consider below snap shot as a sheet2
 

Attachments

  • sheet2.PNG
    sheet2.PNG
    41 KB · Views: 2
Upvote 0
Yes Amor,
1)The project id is 7digit (stating first letter is alphabet or only number)
2)sheet2 project column is only ID, sheet3 project column is id+name
Dear Amor,
Can you please provide solution about previous reply.
 
Upvote 0
If you change the structures of the sheets, the macro or previous solutions will not work.

1583514070829.png


You could put examples of your 3 sheets using xl2bb tool. Please put the information with the real structure, that way I can deliver a suitable solution.
 
Upvote 0
Hi Amor,

I have uploaded sheet3 image, because unable to download XL2BB. tomorrow I'll add full data in XL2BB from my personal laptop. meanwhile can you please consider below attached image as a sheet3.

Thank you in advance.
 

Attachments

  • Capture.JPG
    Capture.JPG
    185.3 KB · Views: 2
Upvote 0
Again you changed the structure of the sheet.
Please, you can provide concise information, but of the 3 sheets, then it would be 3 images.
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,560
Members
449,089
Latest member
Motoracer88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top