Martynrbell
New Member
- Joined
- Apr 11, 2016
- Messages
- 38
- Office Version
- 365
- Platform
- Windows
Hi All.
I have some data in two columns that are there similar
an example been
<tbody>
</tbody>
Im writing an If statement where If the cell begins with DA2 it compares the two cells and returns the difference.
The only way i can thing of doing it is by extracting the numbers and assigning them two a variable (my terminology is well off i know)
So for example VBA reads the cells and creates the following
ADA21 = 635320
ADA22 = 11845
BDA21 = 635455
BDA22 = 11848
I should then be able to do ADA21 - BDA21 and ADA22 - BDA22 to get two separate values.
Can anyone help out with this or even suggest a better way if there is one ?
Thanks in advance
I have some data in two columns that are there similar
an example been
DA2*635320*11845*50*1 | DA2*635455*11848*135*3 |
<tbody>
</tbody>
Im writing an If statement where If the cell begins with DA2 it compares the two cells and returns the difference.
The only way i can thing of doing it is by extracting the numbers and assigning them two a variable (my terminology is well off i know)
So for example VBA reads the cells and creates the following
ADA21 = 635320
ADA22 = 11845
BDA21 = 635455
BDA22 = 11848
I should then be able to do ADA21 - BDA21 and ADA22 - BDA22 to get two separate values.
Can anyone help out with this or even suggest a better way if there is one ?
Thanks in advance