Hi guys,
So I'm completely new to VBA and Python. I work in a Physical Chemistry lab that involves me processing a large amount of data and there's a particularly tedious task which I am struggling to get automated.
I've attached an image of an excel spreadsheet as an example below for what I need to do get done with an explanation below:
Using the above images as an example and starting at cell C1:
1. The value in C1 is 1194.5. What I need to do is to move the white part of the column i.e C4 and everything below so that the top cell (C4) is in line with a cell in the B column which has the same value or +/- 0.1 of C1. So C1 is 1194.5 and B6 is 1194.6 (which is 1194.6 - 0.1) so C4 would need to be in line with B6 and C5 would be in line with B7, C6 with B8 etc
2. Next would be D4 which is 1194.7. The data from D4 and below will need to be moved so that D4 is in the same row as B6 ( i.e 1194.6 +0.1)
3. Next would be E1 which is 1194.9. The data from D4 and below will need to be moved so that D4 is in the same column as 1194.9 (D7) etc etc....
As you may understand, this is very tedious and recording a simple macro does not work as sometimes the columns need to be moved by different amounts.
Is this a trivial macro to write?
Thanks very much for your time and any help is much appreciated with this.
David
So I'm completely new to VBA and Python. I work in a Physical Chemistry lab that involves me processing a large amount of data and there's a particularly tedious task which I am struggling to get automated.
I've attached an image of an excel spreadsheet as an example below for what I need to do get done with an explanation below:
Using the above images as an example and starting at cell C1:
1. The value in C1 is 1194.5. What I need to do is to move the white part of the column i.e C4 and everything below so that the top cell (C4) is in line with a cell in the B column which has the same value or +/- 0.1 of C1. So C1 is 1194.5 and B6 is 1194.6 (which is 1194.6 - 0.1) so C4 would need to be in line with B6 and C5 would be in line with B7, C6 with B8 etc
2. Next would be D4 which is 1194.7. The data from D4 and below will need to be moved so that D4 is in the same row as B6 ( i.e 1194.6 +0.1)
3. Next would be E1 which is 1194.9. The data from D4 and below will need to be moved so that D4 is in the same column as 1194.9 (D7) etc etc....
As you may understand, this is very tedious and recording a simple macro does not work as sometimes the columns need to be moved by different amounts.
Is this a trivial macro to write?
Thanks very much for your time and any help is much appreciated with this.
David