Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50259

Data looping in vba

$
0
0
I'm not great with VBA at all, I've got some logic but need some help putting together the code..
How would you do something like this in excel?

For each column (column B + 4... ex: columns B, F, J, N etc until last column with data),
copy and paste first range of data in that column to column A of a new worksheet called "work"
for the 2nd range of data until the end:
copy and paste the range of data into "work" column B
Do custom process to the 2 columns (A and B) in worksheet "work" that results in output in column C (also in worksheet "work")
Delete column A and B
When no more ranges of data exist, copy final column C to a new worksheet called "final"
.
.
To give an example about what I mean about "range of data", each column data will look a little like this:

1
3
5
6
7

3
4
5
7

2
4
7
8
2
5


So while initially i would copy that first portion, in the second loop i would add the 2nd portion, do some calculations that output into column C, then I would delete columns A and B with the data, and I would go back and add the new range of data and repeat..

Viewing all articles
Browse latest Browse all 50259

Trending Articles