Bulk update with cell references?

Adam_P

New Member
Joined
Aug 26, 2018
Messages
3
Hi all,

My first question on here - so go easy!

I have a sheet with over a million data elements (1000s of rows by around 100 columns).

I've been given another sheet with the references of the exact cells that need updating, along with the new data that needs to go in to those cells. i.e.

[TABLE="width: 215"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD][TABLE="width: 215"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]C28[/TD]
[TD]new data 1[/TD]
[/TR]
[TR]
[TD]D55[/TD]
[TD]new data 2[/TD]
[/TR]
[TR]
[TD]CD2029[/TD]
[TD]new data 3[/TD]
[/TR]
[TR]
[TD]AA2022[/TD]
[TD]new data 4[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]


Is there a way to update each of those specific cells with the new data? If there was a small population of changes i'd do it by hand, but unfortunately changes often run in to hundreds at a time.

Please help! :)
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hi & welcome to the board.
How about
Code:
Sub UpdateData()
   Dim Cl As Range
   
   For Each Cl In Range("A1", Range("A" & Rows.count).End(xlUp))
      Sheets("[COLOR=#ff0000]Data[/COLOR]").Range(Cl.Value).Value = Cl.Offset(, 1).Value
   Next Cl
End Sub
Change sheet name to suit.
The sheet with the updates needs to be active when you run this.
Assumed the the cell ranges are in col A with update in col B
 
Upvote 0
Thanks so much!! - IT works a treat!

Is there a way I can tip you a coffee or something? You literally saved me hours!
 
Upvote 0
Glad to help & thanks for the feedback.

Is there a way I can tip you a coffee or something?
You just have :)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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