How to adjust range of cells in VBA

Smithy007

New Member
Joined
Nov 6, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi All

I am a total Excel novice and am (attempting) using an existing Excel file that has Macros.

The Macros are intended to pull data from one worksheet ('Data') into several others (example shown below) to populate some simple tables. The problem is that the there have been columns added to the original 'Data' spreadsheet and now the tables are getting the information from the incorrect columns.

I need to edit the range of cells that the information is being pulled from, but I have no clue where to start. I am busy watching videos on line and my brain's breaking - I desperately need some help!

An example is shown below: Top image is the simple table being populated and the second is the VBA code for the Macro. It is supposed to populate all columns but is pulling data for the Training Priority from the wrong column, so I am only getting 'x'. How do I make it select the appropriate column in the 'Data' worksheet?
1667793414912.png

1667793516524.png
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
The explanation is not clear because there is no reference to sample given.
The columns and rows of your Excel sheet have been cut out. No idea what the columns and rows are.
What column has been added?
How's the original table which the macro worked properly?

Install XL2BB and learn to use it to copy paste range of the sheet. This was your sample no need to be retyped but helpers can just copy paste.
 
Upvote 0

Forum statistics

Threads
1,214,839
Messages
6,121,892
Members
449,058
Latest member
Guy Boot

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