RAJESH1960
Banned for repeated rules violations
- Joined
- Mar 26, 2020
- Messages
- 2,313
- Office Version
- 2019
- Platform
- Windows
Hello experts,
The amounts in column B and C are entered using formula '=RANDBETWEEN(10,90*10)*10. I have to match actual amount with the total as per calculation. The difference must show zero(0). I select the amounts from cell B50 upwards till I get the nearest value of the difference and delete it. Then I enter the difference amount in the last empty column in column B to get zero. I do this for every column in the sheet. There are around 30 columns in each sheet and has 12 months sheet data to be matched. It takes a lot of time. I was hoping whether, if this would be possible with the help of a code, it will save a lot of time.
The amounts in column B and C are entered using formula '=RANDBETWEEN(10,90*10)*10. I have to match actual amount with the total as per calculation. The difference must show zero(0). I select the amounts from cell B50 upwards till I get the nearest value of the difference and delete it. Then I enter the difference amount in the last empty column in column B to get zero. I do this for every column in the sheet. There are around 30 columns in each sheet and has 12 months sheet data to be matched. It takes a lot of time. I was hoping whether, if this would be possible with the help of a code, it will save a lot of time.
Code to match amounts.xlsx | |||||||||
---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | |||
1 | Apr-20 | 01-04-2020 | 02-04-2020 | Apr-20 | 01-04-2020 | 02-04-2020 | |||
2 | 7770 | 4540 | 7770 | 4540 | |||||
3 | Original Data | 8270 | 5590 | Matched Data | 8270 | 5590 | |||
4 | 6400 | 5110 | 6400 | 5110 | |||||
5 | 580 | 5740 | 580 | 5740 | |||||
6 | 4570 | 3210 | 4570 | 3210 | |||||
7 | 4360 | 500 | 4360 | 500 | |||||
8 | 4320 | 850 | 4320 | 850 | |||||
9 | 3670 | 5450 | 3670 | 5450 | |||||
10 | 4280 | 5000 | 4280 | 5000 | |||||
11 | 3180 | 2430 | 3180 | 2430 | |||||
12 | 7830 | 320 | 7830 | 320 | |||||
13 | 2770 | 2480 | 2770 | 2480 | |||||
14 | 6230 | 8300 | 6230 | 8300 | |||||
15 | 280 | 4690 | 280 | 4690 | |||||
16 | 6760 | 3610 | 6760 | 3610 | |||||
17 | 8900 | 500 | 8900 | 500 | |||||
18 | 990 | 4340 | 990 | 4340 | |||||
19 | 7310 | 410 | 7310 | 410 | |||||
20 | 4060 | 6460 | 4060 | 6460 | |||||
21 | 110 | 1760 | 110 | 1760 | |||||
22 | 1570 | 2310 | 1570 | 2310 | |||||
23 | 3080 | 4600 | 3080 | 4600 | |||||
24 | 350 | 7040 | 350 | 7040 | |||||
25 | 7950 | 120 | 7950 | 120 | |||||
26 | 1130 | 5680 | 310 | 5680 | |||||
27 | 6770 | 3120 | 3120 | ||||||
28 | 8730 | 1790 | 1790 | ||||||
29 | 1590 | 8450 | 8450 | ||||||
30 | 3520 | 3290 | 1500 | ||||||
31 | 1460 | 7650 | |||||||
32 | 2250 | 1910 | |||||||
33 | 2130 | 4570 | |||||||
34 | 6880 | 4330 | |||||||
35 | 1480 | 4530 | |||||||
36 | 6190 | 3760 | |||||||
37 | 360 | 5610 | |||||||
38 | 8760 | 1530 | |||||||
39 | 1180 | 4520 | |||||||
40 | 8530 | 8740 | |||||||
41 | 7760 | 6000 | |||||||
42 | 8040 | 7350 | |||||||
43 | 6330 | 2210 | |||||||
44 | 4230 | 1990 | |||||||
45 | 7050 | 8180 | |||||||
46 | 1570 | 7350 | |||||||
47 | 7100 | 1570 | |||||||
48 | 1890 | 7200 | |||||||
49 | 4330 | 2950 | |||||||
50 | 410 | 3940 | |||||||
51 | |||||||||
52 | Total As per Calculation | 2,15,260.00 | 2,03,580.00 | Total As per Calculation | 1,05,900.00 | 1,05,900.00 | |||
53 | Actual Amount | 1,05,900.00 | 1,05,900.00 | Actual Amount | 1,05,900.00 | 1,05,900.00 | |||
54 | Difference | 1,09,360.00 | 97,680.00 | Difference | - | - | |||
55 | 207040.00 | 0.00 | |||||||
56 | |||||||||
April workings |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B1,F1 | B1 | =A1 |
C1,G1 | C1 | =B1+1 |
F52:G52,B52:C52 | B52 | =SUM(B2:B50) |
F54:G54,B54:C54 | B54 | =B52-B53 |
A55,E55 | A55 | =SUM(B54:C54) |