Ms excel - how do I add 1 day to my custom date? - excel

I'm trying to add days consecutively across row 9 starting with Sunday.
In field e3 is the date for the beginning of the pay period in 6/24/17 format
In field c9 I have =TEXT(E3,"ddd, m/dd")
In d9 I have tried
=TEXT(E3,"ddd, m/dd")+1
=C9+1
And a few other ways but it returns "value"
How can I get the days in my custom format to auto grow in the custom format I have based on the original date in e3?

Don't use TEXT to format a date. Rather, right click on the cell(s), select Format Cells, Number, Custom, and enter your custom format there.
To increment dates, simply doing =dateCell + 1 works so long as that cell is a date; if it's not you're attempting to add 1 to a string; which doesn't make sense.
Example
Create a sheet with the following values/ formulae:
| A | B |
1 | Date | Formatted Date |
2 | 2017-06-24 | =A2 |
3 | =A2 + 1 | =B2 + 1 |
Leave column A's formatting as General; Excel will figure out that it's a date and will display it according to your local settings.
In column B, follow the steps above to format the cells as ddd, M/dd.
The result should look like this (column A's behaviour depending on your regional settings):
| A | B |
1 | Date | Formatted Date |
2 | 06/24/2017 | Wed, 6/24 |
3 | 06/25/2017 | Thu, 6/25 |

Related

Conditional Formatting TODAY() with Date + Time in cell

What I am trying to do is highlight cells that contain both a date and time together, I would like it to ignore the time and highlight the cell if the date is equal to TODAY.
For example:
-| A | B |
1 | Option1 | 06/17/2020 0800 |
2 | Option2 | 06/17/2020 1500 |
3 | Option1 | 06/18/2020 2300 |
4 | Option1 | 06/20/2020 0800 |
I would want B1 and B2 highlighted if today was 06/17/2020.
I tried a few different formulas in conditional formatting I found on Google, but with no luck.
Thank you!
Use a rule based on the following formula:
=--(LEFT($B1,10))=TODAY()
Apply to column B.
Note that this assumes that the date portion is always in the format mm/dd/yyyy, i.e. it takes up the 10 left characters.

Calculating days record open with Excel formula

I am currently trying to use a excel formula to estimate how long a record has been open based off of two fields and today's date. I however want to have the formula to be blank if the "Closed Date" is not populated. I haven't had success with getting this result.
Example in Excel:
| | A - Open Date | B - Closed Date |
|---|-----------------|-----------------|
| 1 | 02 January 2019 | 04 January 2019 |
| 2 | 02 January 2019 | |
| 3 | | |
I currently am using the following formula for each pertaining row;
=IF(B1>0, B1-A1,TODAY()-A1)
=IF(B2>0, B2-A2,TODAY()-A2)
=IF(B3>0, B3-A3,TODAY()-A3)
For the first row I will get 2 which is correct. The second row will also have 2 but will go up each day which is also correct. The third row will have a large number like 43559 which is due to there being no open date in A3. Any assistance would be appreciated. Thank you.
I'll add this as an answer as I think you mean:
If "Open Date" is not populated show a blank
If "Closed Date" is not populated use todays date.
=IF(A1="","",IF(B1="",TODAY(),B1)-A1)
Maybe: =IF(B1="","",B1-A1) ??

Excel: Average of parts of a column based on another column

Using Excel 2011 for mac, I have three columns: ID, Start date, end date and time to completion. (Date format: dd/mm/yyyy)
ID | Start | End | Time
1 | 01/01/2016 | 05/01/2016 | 4
2 | 04/01/2016 | 08/01/2016 | 4
3 | 01/02/2016 | 14/02/2016 | 13
4 | 02/02/2016 | 20/02/2016 | 18
5 | 01/03/2016 | 05/03/2016 | 4
6 | 06/03/2016 | 08/03/2016 | 2
7 | 12/03/2016 | 15/03/2016 | 3
Column D is basically the difference between column C and column B.
Now I have the total average, which is easy to calculate but I'd also like to have the averages for the different months.
And this is where my knowledge falls apart. I've tried several things but I can't seem to figure out how to calculate an average using only the cells in a column that match a certain value in another column. I could sort the tickets by date and do it manually by doing the average for only a certain range but as this list constantly changes this is definitely not a nice option.
Check out the AVERAGEIF function
AVERAGEIF(selection_range, criteria, averaging_range)
It uses the values in the selection_range to filter which values in the averaging_range will be averaged.
In your case you could say AVERAGEIF(B1:B8, "01/01/2016", D1:D8)
There are multiple ways. I would personally use an array formula, but that may be a bit advanced and overly complicated.
I suggest adding a column E "Month" - into E2 add:
=MONTH(B2)
Then copy cell E2 to E3:E8.
Now you can easily get a monthly average by applying the AVERAGEIF command:
=AVERAGEIF(E2:E8,2,D2:D8)
The second argument, 2, indicates February, but may be exchanged with any number from 1-12.

How can I put together a SUMIFS in Excel to include an OR?

I'm trying to put together a calendar of regular payments which will have a date begun, day the money is paid and the date cancelled (if there is one), however I'm struggling with setting up my SUMIFS function. I've set up an example here.
What I'm trying to do is add the paid value on the day the payment is made, if the date started is less than the date, and only if the date cancelled is empty or the date is before the date cancelled.
List of payments:
A B C
1 Payment | Begun | Cancelled
---------+------------+------------
2 £5.00 | 01/01/2016 |
3 £9.00 | 04/01/2016 | 01/02/2016
Calendar (that I'd expect):
E F
1 Date | Payment
----------+---------
2 01/01/16 | £5.00
3 02/01/16 | £0.00
4 03/01/16 | £0.00
5 04/01/16 | £9.00
...
33 01/02/16 | £5.00
34 02/02/16 | £0.00
35 03/02/16 | £0.00
36 04/02/16 | £0.00
So in this example: £5 should be added on 01/01/16 and 01/02/16, while £9 should be added on 04/01/16 only.
So far in the F column I have:
=SUMIFS($A$2:$A$3, DAY($B$2:$B$3), "="&DAY(E2), $B$2:$B$3, "<="&E2, $C$2:$C$3, ">="&E2)
This Array formula in F2 should do what you want:
=SUM(IF((DAY($B$2:$B$3)=DAY(E2))*(E2>=$B$2:$B$3)*(E2<=$C$2:$C$3),$A$2:$A$3))+SUM(IF((DAY($B$2:$B$3)=DAY(E2))*(E2>=$B$2:$B$3)*(""=$C$2:$C$3),$A$2:$A$3))
It is an Array formula and must be confirmed with Ctrl-Shift-Enter. Then copied down.
The 'OR' in Array formulas must use a +. If all you had were AND the * would work.
I assume you are going to be adding dates to columns A:C, you can change all the small absolute ranges to the desired ranges and it will work for multiples.
Do forgive our backwards dates.
you should just ADD the results of two separate SUMIF()'s in your case:
=SUMIFS($A$2:$A$3, DAY(B$2:B$3), "="&DAY(E2), $B$2:$B$3, "<="&E2, $C$2:$C$3,">="&E2)
+
SUMIFS($A$2:$A$3, DAY(B$2:B$3), "="&DAY(E2), $B$2:$B$3, "<="&E2, ISBLANK($C$2:$C$3),TRUE)
Confirm with Ctrl+Shift+enter

MS Excel - finding the first row after a certain date

Say I have a spreadsheet with the following, and for convenience say all of this starts from cell A1.
---------------------------------------
| Date | Item | Account |
---------------------------------------
| 01/09/2011 | Testing 1 | USD |
| 03/09/2011 | Testing 2 | USD |
| 11/09/2011 | Testing 3 | USD |
| 20/10/2011 | Testing 4 | JD |
| 22/10/2011 | Testing 5 | JD |
| 25/10/2011 | Testing 6 | USD |
| 03/11/2011 | Testing 7 | USD |
| 05/11/2011 | Testing 8 | JD |
---------------------------------------
Now, I want to run a report for a month, starting on 1/10/2011 and ending on 31/10/2011. I need to find the first row on or after the starting date, and then get every subsequent row until the end date. If I can figure out how to get the row reference for the first and end dates, then I can figure out the rows in between (obviously!).
I have only been able do these sorts of matches on exact matches ie. no idea how to do 'greater/less than' matches.
How would I go about matching on both the date and the account columns?
Needless to say, this needs to be in a formula.
=match(date(2011,10,1),a2:a9,1)+1
=match(date(2011,10,31),a2:a9,1)
First formula shows row for the first record for October, second formula for the last day. Data must be sorted in ascending order.
Use the following Array Formula for finding the Row containing the earliest date, which is equal to or greater than the date mentioned in cell C1 (in your case this is 1 October).
=MATCH(MIN(IF($A$1:$A$30>=C1,1,9999)*$A$1:$A$30),$A$1:$A$30,0)
Date list is in cells A1 to A30. Change the references as required.
Data need not be sorted in ascending or descending order.
Use the following Array Formula for finding the Row containing the latest date which is equal to or less than the date mentioned in cell D1 (in your case this is 31 October). Data need not be sorted in ascending or descending order.
=MATCH(MAX(IF($A$1:$A$30<=D1,1,0)*$A$1:$A$30),$A$1:$A$30,0)
If you want the earliest and latest dates, use the following Array Formulas.
=MIN(IF($A$1:$A$30>=C1,1,9999)*$A$1:$A$30)
=MAX(IF($A$1:$A$30<=D1,1,0)*$A$1:$A$30)
All the formulas used above are Array Formulas. To enter an array formula, use Control+Shift+Enter instead of Enter.
Vijaykumar Shetye, Goa, India
I would recommend using a pivot table for this. Look at the second link on in the "Excel Templates - Pivot Table" section on this page on the Contextures site.

Resources