Aramiu

04-08-2015, 02:09 PM

Hello,

I'm new to vba and I need help for developing a way to copy cell values from a workbook to another. I require the vba to copy all the cells that have values from columns B,C,D,E,F from the first workbook (3rd sheet), and place them in the other workbook, only if cells in column B from the first workbook have values. The problem is that based on the following condition: cells in column E > cells in column D (workbook A), the values have to be pasted in different locations in the second workbook, in the next free row. All cells that need to be copied must be pasted in the first sheet in workbook 2.

So, to resum:

workbook A, workshhet 1, if the first cell in column B has values, copy in column A in workbook B, first sheet; also, based on the condition that the first cell in column B has values (workbook A), also copy the other cells from columns C,D,E,F, using the following algorithm:

If cell value in column E is bigger than cell value in column D, copy cell from column C in column H (workbook B), copy cell from column D in column J (workbook 2), copy cell from column E in column K (workbook B), copy cell in column F to cell in column L (workbook B), otherwise, if condition is not true, copy cell value from column C in column O (workbook B), don't do anything with cells from column D, copy cell from column E in column P(workbook B), copy cell from column F to cell in column Q (workbook B). Do the same for all rows in workbook A, that have values in the cells from column B and paste the values using the above algorithm in the first free row that doesn't have any value in the column A cells.

Please, I would very much appreciate any help that you can provide. Thank you!

1313413135

I'm new to vba and I need help for developing a way to copy cell values from a workbook to another. I require the vba to copy all the cells that have values from columns B,C,D,E,F from the first workbook (3rd sheet), and place them in the other workbook, only if cells in column B from the first workbook have values. The problem is that based on the following condition: cells in column E > cells in column D (workbook A), the values have to be pasted in different locations in the second workbook, in the next free row. All cells that need to be copied must be pasted in the first sheet in workbook 2.

So, to resum:

workbook A, workshhet 1, if the first cell in column B has values, copy in column A in workbook B, first sheet; also, based on the condition that the first cell in column B has values (workbook A), also copy the other cells from columns C,D,E,F, using the following algorithm:

If cell value in column E is bigger than cell value in column D, copy cell from column C in column H (workbook B), copy cell from column D in column J (workbook 2), copy cell from column E in column K (workbook B), copy cell in column F to cell in column L (workbook B), otherwise, if condition is not true, copy cell value from column C in column O (workbook B), don't do anything with cells from column D, copy cell from column E in column P(workbook B), copy cell from column F to cell in column Q (workbook B). Do the same for all rows in workbook A, that have values in the cells from column B and paste the values using the above algorithm in the first free row that doesn't have any value in the column A cells.

Please, I would very much appreciate any help that you can provide. Thank you!

1313413135