Increment column based on date - Excel - excel

I am trying to create an excel formula that will increment as the year changes. The following is what i am trying to do:
http://i58.tinypic.com/nbc1fc.jpg
I have 2 columns - date and id.
What i would like to do is increment the ID column by +1 when the year changes in the date column. So, dates from the same year will get the same id. (i am not concerned by the month/day values, all i need to do is assign the same id to dates from the same year).
I have tried a variety of formulas in excel but my excel skills are not great and i have been unable to find a solution. The best i could come up with is:
IF(YEAR(A1=1928),420) but that would be quite monotonous to do for every year in the excel file.
i did try to do a bit of research and the only similar question that i could find on here was this -->
Increment number when Date changes
Any help would be much appreciated

Please try, in say B2 assuming your data starts in A1:
=IF(YEAR(A2)=YEAR(A1),B1,B1+1)
and you have chose a value for B1. Copy down to suit.

Related

Excel - How to sum values for specific days

How can I sum all the OT(hr) value only for specific day?
Requirement: I need to sum all the OT(hr) for one person for Sunday only. One person means one row in the table.
I tried this few code but it doesn't work :
=sumif(WEEKDAY(1,1),O8:AD8) or
=SUMIF(O8:AD8,TEXT(O6:AD6,"dddd")="Sunday")
Thank you so much
In my example, I don't use merged cells. I wouldn't recommend having merged cells for the date. Date must be above the OT (hr). And the Ot (hr) you also need to put into the formula.
This formula was working for me:
=SUM((WEEKDAY(O2:AD2;1)=1)*(O3:AD3="OT (hr)")*(O4:AD4))

EXCEL Online - Pull entire column of data where condition (without VBA)

trying to figure out how to summarise some data quickly.
I have here an example of what I am trying to do in the attached picture.
Basically - I have a yearly planner with some names, and on various dates there's a X marking that person on that date.
I need to be able to summarise on either the bottom or a new sheet, the total days as a list of days where there's a mark. The data also needs to be presented in the same format - with all names shown even if there's a blank in that days cell.
I can't use VBA because I'm forced to use EXCEL online unfortunately.
I basically want (from a coders perspective) select column where column not null.
Can anyone help me understand how I would do this please? If not I'll have to manually go through and pull out the columns on a weekly basis
Thanks!
Example
It took a few hours to build a solution.
https://1drv.ms/x/s!AncAhUkdErOkgqRwUEztHeWbj3LkqA?e=s4x0SI
A3 =IF(COUNTIF(C3:L3;"x")>0;ROW();"")
C1 =IF(COUNTIF(C3:C12;"x")>0;COLUMN();"")
B17 =IFERROR(INDEX($B$3:$B$12;MATCH(SMALL($A$3:$A$12;ROWS($A$3:A3));$A$3:$A$12;0));"")
C16 =IF(IFERROR(SMALL($C$1:$L$1;COLUMNS($C$1:C1));"")<>"";HLOOKUP(IFERROR(SMALL($C$1:$L$1;COLUMNS($C$1:C1));"");$C$1:$L$2;2);"")
C17 =IF(IFNA(INDEX($C$3:$L$12;MATCH($B17;$B$3:$B$12;0);MATCH(C$16;$C$2:$L$2;0));"")=0;"";IFNA(INDEX($C$3:$L$12;MATCH($B17;$B$3:$B$12;0);MATCH(C$16;$C$2:$L$2;0));""))

Guide me Regarding Compare the Value of Cell contain date and other cell contain Drop down list

Hy Every One, I need help in excel formula, I have two sheets, sheet1 for sale tracker, sheet two for goals tracker, I used Now() to enter date automatically, and its working fine, Next in goal sheet, I use =Sumif() to calcualte various category totals and refer them in cell. Its also working fine. But I want to track record according to month and category. Like I have 6 categories detail is as under,
Sales Tracker
In the First picture Column Date consist of formula "=IF(ISBLANK(B5),"-",TODAY())" and it display the name of month like "October"
While in second picture there is a drop down list of "Month" Column.
1- I want to use if statement like =if(Date=Month, Sum(Revenue Secure column Data), "-") But its not working the formula I wrote here is an example....
2- I want when I select any month from second sheet like January, February, It should calculate sum from picutre one data and only show the sum of january etc.
Please help me, this is eating my brain a huge,,,,,,:)
Thanks in advance....
In short my question is how can I use If statement to compare value of cell that contain formula and other that contain drop down list?
Or use the MONTH function to change your date to a number 1 to 12 corresponding to the month. Then have the combo return a number for the month chosen. It might be faster using integers than test
I Believe you have to compare the month and not the whole date.
You can do TEXT(NOW();"mmmm") to get the full month name of the current data (in the language of excel) and then compare it to your drop down.
If you replace the NOW() with any data it works as well.

Telling whether a date is before a particular time in excel

I have a spreadsheet with a date column in Column A. I want to have a column where it returns TRUE if the date is before September 2016. How do I do that?
I tried this code in Excel but it wouldn't work.
=if(A1="2017","TRUE",if(month(F1)<"September,"FALSE","TRUE"))
Can anyone help me correcting this one? Thanks
I'm assuming Column A has the actual dates (ex: 3/3/2017). So your if statement (if<"September") is trying to compare text against a date, which will give you an error.
Easiest way to do this is enter 9/30/2016 in a separate cell (for this example, say Q1). Then in your formula, simply use:=A1 < $Q$1 and drag that down. It should give you T/F for the dates.
If Column A is formatted as a date, it has to be compared with a date only. If not excel will give you unexpected results.
The DATE function in excel allows you to input data in date format with Years, Months and Days. The format is below,
=DATE(Years,Months,Days)
You can try the below formula,
=A1<DATE(2016,9,30)
and drag it down throughout the range.

Excel: Trying to count cells based on date, can't figure out SumIf

hopefully you can help me with this. I've been trying to figure it out in Excel myself, but I can't make the functions work and it's causing me to manually count the cells.
I've created a sample sheet on Google to show roughly what I'm trying to do;
https://docs.google.com/spreadsheets/d/18bFBvtbK-3JDj6Z6_b6NHttaytApNvdfw92ZcI4ECws/edit#gid=0
I have a series of tests my personnel have to take annually, and I want to write a function that displays the total number of tests taken within the past year. Cell B1 would be the column title, B2-4 would display the date the test was taken, and B5 is where I want the number of dates in B2-B4 that are less than one year old.
Any ideas?
If you want less than a year old from todays date then just count all values that are greater than 365 days ago,
=COUNTIF(B2:B4, ">"&(TODAY()-365))

Resources