PDA

View Full Version : VBA Cells update vica-versa using VBA code - Level 100 Can somebody solve this?



makiwara
05-20-2018, 11:21 AM
Hello! I need some help with VBA. This is a really challenging project I think.

I have five worksheets, names of them are: 1,2,3,4, and 5
On every worksheet in the first column there is a universal "code" following this pattern: A1, A2, A3, A4... and so on up to N5000 (or last row containing data)
And on every workhseet in the first row there is a header containing different labels like "date", "birthday", "name" and so on.

https://ibb.co/jVmkbT (https://www.mrexcel.com/forum/redirect-to/?redirect=https%3A%2F%2Fibb.co%2FjVmkbT)

So the code notices if a cell's content (or it's format) is changed (for example I edit Sheet "3" in this imaginary example) and examines the header of the cell's column (for example it finds "Name") and the first cell of its row. (it finds a value of "A2121" in column "A" for example there)

So there you get an INDEX: the cell in the cross of A2121's row and column "Name" --> the code examines it on the other for worksheets too, and if there is an INDEX match there, than overwrites every value, which is in the cross of "A2121" and "Name" on every other workhseets, using some "INDEX" properties.

Can you help me maybe solving this problem? I really appreciate your help! I know that it's not an easy task, so I think that this is the right place to ask for help https://www.mrexcel.com/forum/images/smilies/icon_smile.gif Have a nice day!

p45cal
05-20-2018, 12:03 PM
you seem to have an answer at https://www.mrexcel.com/forum/excel-questions/1056274-cells-update-vica-versa-using-vba-code-level-100-can-you-solve.html

read http://www.excelguru.ca/content.php?184

makiwara
05-20-2018, 12:13 PM
Thank you, but as you might you have been read, there is no answer for my question, although I highly appreciate any help I got.

There are problems which arent solved yet and they seem way more difficult than solving in 2 minutes :-)

This is a kind of code which can be useful for almost everybody who works with the same data on different worksheets, because it will allow people to achieve automatic updated worksheets.

If you or somebody could help, that would be a great thing! Have a very nice day! :-)

Aussiebear
05-20-2018, 03:31 PM
Thank you, but as you might you have been read, there is no answer for my question, although I highly appreciate any help I got.

It does seem that you are missing the main point here, in that you have posted the issue in multiple forums and have not bothered to indicate that you have done so. Have you read the linked article that P45cal asked you to?

makiwara
05-21-2018, 12:03 AM
I really sorry this. I have read and learnt from it. Really sorry! Have a nice day!

makiwara
05-21-2018, 01:38 AM
Hi! I could solve the problem after examining the code adding 2 extra lines, so it works perfectly now.

The code is available at this link:

https://www.mrexcel.com/forum/excel-questions/1056274-cells-update-vica-versa-using-vba-code.html

If you have a database, and the data are edited on multiple worksheets ,but the "header" and an ID /universal code is given on every worksheet, the code will find every data in the intersection of the "header" and the "universal code" and updates it on every worksheet! So it's a great tool to automatic update your data! :-)

Thanks for JLGWHIZ for his help! Have a nice day!