Update cells in a table using the text in column A as the reference to find the correct row

Tony_Y

New Member
Joined
May 29, 2020
Messages
35
Office Version
  1. 365
Platform
  1. Windows
Hi everyone,

I have a worksheet called DATA TABLE which has some 30+ columns. Located in column A is the specific site name. I have another worksheet called DATA AMEND which I am able to populate specific cells with information from DATA TABLE. I wish to then alter any of the cells in DATA AMEND and use a shape as a command button to transfer the data back into the correct row and column of the DATA TABLE.

To be honest I've been at this weeks and pulled out that much hair and don't require a post lockdown haircut!

Any pointers in the right direction will be appreciated.

regards

Tony
 

Attachments

  • 2020-07-08.png
    2020-07-08.png
    75.8 KB · Views: 18

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Using this sheet (from a previous posters question)

MFRdate begdate endpriceMFRdate begdate endpricecheck(outuput column)
XXX4404444044XXX-ltd
8/1/2020​
8/1/2020​
100​
XXX4404444044XXX
8/1/2020​
8/1/2020​
100​
Match
YYY4407544075YYY-ltd
9/1/2020​
9/1/2020​
200​
YYY4407544044YYY
9/1/2020​
8/1/2020​
No MatchMatch
GGG4410544105GGG-ltd
10/1/2020​
10/1/2020​
300​
MMM4413644136MMM-ltd
11/1/2020​
11/1/2020​
400​

This code (once amended) should run through your updates
VBA Code:
Sub matcher()
    Do Until ActiveCell.Value = ""
        Range("H1").Select
        mySearch = ActiveCell
        myUpdate = ActiveCell.Offset(0, 1).Value
        myRow = WorksheetFunction.Match(mySearch, Range("A2:A5"), 0) + 1
        Range("B" & myRow).Value = myUpdate
        ActiveCell.Offset(1, 0).Select
    Loop
End Sub
 
Upvote 0
Hi

thanks for the prompt response.The code I have just goes to debug. I am back on it tomorrow and will update you.

regards

Tony
 
Upvote 0
If you get an error you need to say which line and what the error says.
 
Upvote 0
Hi Steve

This is what happens. Sorry for late reply
 

Attachments

  • 2020-07-09.png
    2020-07-09.png
    75.8 KB · Views: 14
Upvote 0
You need to use
VBA Code:
Range("Amendsite_Name").value
Also, in future please post your code to the site, otherwise potential helpers have to type it out again. ;)
 
Upvote 0
Hi Fluff,

I apologise for that and will do in future. Many thanks for your help.

regards

Tony
 
Upvote 0
Did that resolve your problem?
 
Upvote 0
Hi,

I am out on a job at the moment and will try it in the morning. I will report back as soon as I try it.
once again many thanks

Tony
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,095
Latest member
nmaske

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