vladimiratanasiu
Active Member
- Joined
- Dec 17, 2010
- Messages
- 347
- Office Version
- 365
- 2021
- Platform
- Windows
Hello!
I have a table, presenting electricity consumption of a client and its variation (+/-) from one month vs. the same one of the previous year. Sometimes, there are months with no consumption (see B21, B22, B26). My formula works fine when two similar months with non-zero values are compared. However, when the first one is zero (e.g. B21, B22, B26) and the next is non-zero (e.g. B34, B35, B39), I need the proper result should be a negative / positive number (E34, E35, E39), but my formula generates 0. How could adjust / change it, in order to get the necessary value?
Thank you!
I have a table, presenting electricity consumption of a client and its variation (+/-) from one month vs. the same one of the previous year. Sometimes, there are months with no consumption (see B21, B22, B26). My formula works fine when two similar months with non-zero values are compared. However, when the first one is zero (e.g. B21, B22, B26) and the next is non-zero (e.g. B34, B35, B39), I need the proper result should be a negative / positive number (E34, E35, E39), but my formula generates 0. How could adjust / change it, in order to get the necessary value?
Thank you!
Book2.xlsx | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
1 | Electrictricity consumption | Annual differences (%) | |||||
2 | Period | Kwh | Value (RON, including VAT) | Consumption (Kwh) | |||
3 | |||||||
4 | Jan-22 | 54.00 | 36.57 | ||||
5 | Feb-22 | 66.00 | 44.70 | ||||
6 | Mar-22 | 78.00 | 53.04 | ||||
7 | Apr-22 | 68.00 | 46.25 | ||||
8 | May-22 | -10.00 | -7.12 | ||||
9 | Jun-22 | 0.00 | 0.00 | ||||
10 | Jul-22 | 0.00 | 0.00 | ||||
11 | Aug-22 | 49.00 | 33.32 | ||||
12 | Sep-22 | 27.00 | 18.13 | ||||
13 | Oct-22 | 51.00 | 34.62 | ||||
14 | Nov-22 | 0.00 | 0.00 | ||||
15 | Dec-22 | 0.00 | 0.00 | ||||
16 | |||||||
17 | Jan-23 | 49.97 | 44.70 | -7.46% | |||
18 | Feb-23 | 16.12 | 53.04 | -75.58% | |||
19 | Mar-23 | 106.00 | 64.98 | 35.90% | |||
20 | Apr-23 | 96.00 | 64.67 | 41.18% | |||
21 | May-23 | 46.00 | 31.72 | -560.00% | |||
22 | Jun-23 | 188.00 | 0.00% | 18800% | |||
23 | Jul-23 | 144.00 | 0.00% | 14400% | |||
24 | Aug-23 | -100.00% | |||||
25 | Sep-23 | -100.00% | |||||
26 | Oct-23 | -100.00% | |||||
27 | Nov-23 | -4.00 | 0.00% | -400% | |||
28 | Dec-23 | 0.00% | |||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
D17:D28 | D17 | =IFERROR(-(1-B17/B4),0) |