Copy Data and Transpose based on sheet name and matching value

TrafficEG

New Member
Joined
Aug 1, 2022
Messages
5
Office Version
  1. 365
Platform
  1. Windows
Hi, I am less experienced than a novice when it comes to VBA. I have 2 sheets to start with, "Input" and "Template". In the "Input" sheet is where I will compile data and have some equations to give final data (image 1 below). I have a macro that will copy the "Template" sheet with the number of times determined by values starting in A8 and every 9 cells lower until the end of the table. Now I need a macro to take data referring to "Signal ID" in the "Input" sheet to the corresponding sheet (see image 2).

Example, Sheet named "30" was created. Macro will look in column A for value 30 and then copy data in column C and transpose it to sheet named "30" starting in Row 13 and so on until sheet "30" has the Phase, Directionality, Clearance Distance, Crosswalk distance, Approach Speed, Average Grade, Existing Clearance and Recommended data from "Input"

Clearance interval_input.PNGClearance interval_Template.PNG
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Hi, I am less experienced than a novice when it comes to VBA. I have 2 sheets to start with, "Input" and "Template". In the "Input" sheet is where I will compile data and have some equations to give final data (image 1 below). I have a macro that will copy the "Template" sheet with the number of times determined by values starting in A8 and every 9 cells lower until the end of the table. Now I need a macro to take data referring to "Signal ID" in the "Input" sheet to the corresponding sheet (see image 2).

Example, Sheet named "30" was created. Macro will look in column A for value 30 and then copy data in column C and transpose it to sheet named "30" starting in Row 13 and so on until sheet "30" has the Phase, Directionality, Clearance Distance, Crosswalk distance, Approach Speed, Average Grade, Existing Clearance and Recommended data from "Input"

View attachment 70659View attachment 70660
The ideal way to build a macro is -

Start Recording Macro
then,
Do the actions you want to do
Complete the actions
Stop Macro Recording

Once this much is achieved then don't run the macro immediately
Generally recording Macro takes Absolute references, that are not required (mostly)

That is the time you post your macro here to resolve the issue that are not solved through the recorded macro.

Best wishes
 
Upvote 0

Forum statistics

Threads
1,214,786
Messages
6,121,553
Members
449,038
Latest member
Guest1337

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