Hi All,
Am new here, have been reading alot here and most of what i've done is find snippets of everything else on this forum and adapt it to what i need, so thanks its been very helpful to date
I am particularly stumped on a problem. I have two spreadsheets (S1, S2) with the same uniqueID number in column B. Each sheet will have thousands of rows, with up to 20 columns. What I need to do is have a macro that compares columns B in both sheets S1 and S2 and if values in cells in column B match, copy the value of column R in S2 , and replace this value INTO column K in S1.
For Example:
In S1, cell B5000 = 123, cell K5000 = 1.0
In S2, cell B400 = 123, cell R400 = 5.0
When macro is run it 'scans' the above two rows in separate sheets , detects they have the same unique ID, then replaces(or copy/pastes) cell K5000 (1.0) with the values from Sheet S2, cell B19 (5.0).
In other words it scans the 'rows' and column B from S2, and if there is a match to column B in S1 it replaces the corresponding cell value in R400 of S2 into K5000 of S1. By row i mean the corresponding 'cell' in that particular row, based on the column...sorry i am not sure how else to put it. The final result should look like:
S1, cell B5000 = 123, cell K5000 = 5.0
S2, cell B400= 123 , cell R400 = 5.0 (no change).
I have had a look at afew of the compare/replace threads though seem unable to adapt them to what i need. Any help would be great, thanks!
Cheers.
Bookmarks