VBA Code - Loop through rows one by one copy perform calculation and paste in another sheet

rachugh86

New Member
Joined
May 17, 2022
Messages
1
Office Version
  1. 2013
Platform
  1. Windows
Need help in coming up with VBA code logic . My requirement is as follows:

Sheet1 (Input Sheet)

ProjectID ProjectName 2022 2023 2024
Project 1 Name A 100 200 300
Project 2 Name B 400 500 600
Project 3 Name C 700 800 900

Sheet2 (1st Output Sheet Read the first entry from Sheet1)

ProjectName Name A
Values 100 200 300
Calculation 50

Sheet3 (2nd Output Sheet Read the calculated value from Sheet2)

ProjectName Calculated Value
Name A 50

Now repeat the entire process for remaining projects as below making sure Sheet2 data is cleared

Sheet2 (1st Output Sheet Read the first entry from Sheet1)

ProjectName Name B
Values 400 500 600
Calculation 150

Sheet3 (2nd Output Sheet Read the calculated value from Sheet2 and add new row each time for projects)

ProjectName Calculated Value
Name A 50
Name B 150
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,223,244
Messages
6,170,976
Members
452,372
Latest member
Natalie18

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