auto populate and substract

apgmin

Board Regular
Joined
Mar 1, 2010
Messages
150
Office Version
  1. 2013
Platform
  1. Windows
cell A1 has the month which has to be manually filled

Cell A2, A3,A4... has the dates of that month, Can we have a formula where the dates are autofilled depending on the month mentioned in Cell A1 ( as some months will have 31 days and some 30 days )

Secondly in Cell B2, B3, B4.... we mention the electricity meter reading as on morning of that day ( the date which is mentioned in column A for that particular cell )

In cell C2,C3,C4... i have put a simple formula of substracting the earlier day meter reading in column B to the current reading, this tells me how much electricity consumption has been done on that day for the last 24hrs.

But if the earlier cell is not filled in column B due to holiday and is blank then the cell in column C it should take the previous filled value from the cells above in column B

Please help
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
In cell C2 : =IF(B2="",0,B2-SUM(C$1:C1))

What is entered in A1 ?
A date, or a month number, or "Jan", or "January", or what ?
 
Upvote 0
Ha! sorry, I forgot I had posts starting from the bottom and go up!
 
Last edited:
Upvote 0
Place the 1st of the month in A1
Enter this in A1 and drag down to A31

=IF(A1="","", IF(DAY(A1+1)=1,"",A1+1))
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top