Hello everyone,
I am quite new to VBA and trying to learn it by creating the complex scenarios in the random excel calculations. I have a question regarding using VBA to copy the data across worksheets. I would appreciate if you could kindly help me with it.
I am trying to copy multiple data from one worksheet to another. In my case,
1- Copy the value from D2 of Sheet1 to H26 of Sheet2
2- Copy the value from H2 of Sheet1
.......2-1- if A1 of Sheet2 is empty, to H27 of Sheet2
.......2-2- else to H28 of Sheet2
3- Copy the value from I2 of Sheet1
.......3-1- if A1 of Sheet2 is empty, to H28 of Sheet2
.......3-2- else to H27 of Sheet2
4- Copy the result from H35 of Sheet2 to J2 of Sheet1
5- Copy the result from H28 of Sheet3 to K2 of Sheet1
6- Continue the process until the end of last row in Sheet 1
I have some calcs in sheet 2 and 3 which are linked to each other so input in sheet 2, which should be coming from sheet 1 also gives some results in sheet 3 and I am trying to take the outputs from sheet 2 and 3, and compile them in sheet 1.
Everything got complicated especially with if clause and multiple data copy. I can create the logic and flow in my mind but I could not manage to run it. Any help from your side would be very much appreciated.
Thanks a lot for your help in advance!
I am quite new to VBA and trying to learn it by creating the complex scenarios in the random excel calculations. I have a question regarding using VBA to copy the data across worksheets. I would appreciate if you could kindly help me with it.
I am trying to copy multiple data from one worksheet to another. In my case,
1- Copy the value from D2 of Sheet1 to H26 of Sheet2
2- Copy the value from H2 of Sheet1
.......2-1- if A1 of Sheet2 is empty, to H27 of Sheet2
.......2-2- else to H28 of Sheet2
3- Copy the value from I2 of Sheet1
.......3-1- if A1 of Sheet2 is empty, to H28 of Sheet2
.......3-2- else to H27 of Sheet2
4- Copy the result from H35 of Sheet2 to J2 of Sheet1
5- Copy the result from H28 of Sheet3 to K2 of Sheet1
6- Continue the process until the end of last row in Sheet 1
I have some calcs in sheet 2 and 3 which are linked to each other so input in sheet 2, which should be coming from sheet 1 also gives some results in sheet 3 and I am trying to take the outputs from sheet 2 and 3, and compile them in sheet 1.
Everything got complicated especially with if clause and multiple data copy. I can create the logic and flow in my mind but I could not manage to run it. Any help from your side would be very much appreciated.
Thanks a lot for your help in advance!