I really hope someone can help, I have a google form where a multiple option of times can be selected, when in google sheets this appears as comma separated. I want to separate the data into columns matching exactly what the time is selected, returning what is in column A and Filtering by what they can do, this will need to be an ARRAYFORMULAR so any new entries automatically get sorted
A = Name Of Memeber
B = Comma Seperated Data
C = Roll or Talent
D:O = Different times ranging from 12PM to 11AM
If I use split function and someone has select times 5PM onwards then then 5PM column D where this should be 12PM, using Match dont seems to tell me I can only reference a single column or single row.
This is what I have right now and for the most part it works unless the CSV Data has someone who has stated they are available at 12 PM then it will show them in both columns 12PM and 2PM where they need only appear in 12PM
I want the result to be Column A if the data contains a matching time and the person is a singer or entertainer in column D
=ARRAYFORMULA(IFERROR(FILTER($A$2:$A, SEARCH(TEXT($D$1, "H AM/PM"),$B$2:$B), ($C$2:$C = "SINGER") + ($C$2:$C = "Entertainer")),""))
Example Sheet
IMAGE OF RESULT
This returns mostly what I want but search is not an exact match Test 5 has 12PM not 2PM and yet shows in 2PM also.
In E2, drag to the right
=iferror(query(arrayformula(trim(split(flatten($A$2:$A&"~"&split($B$2:$B,",")&"~"&$C$2:$C),"~"))),"select Col1 where Col2='"&to_text(value(E$1))&"' and Col3='Example 2' ",0))
Related
I am stuck on how to accomplish this in excel so need some help please.
I am have two columns: ID and Date
There can be multiple dates per ID so the ID can be listed more than one time. I need to set up another column with the "Next highest date" for that ID or blank if that is the highest date. Ultimately I need to calculate the difference between the two dates.
I have been googling for a while and have tried a few things but nothing seems to be working.
This can be done using MINIFS:
The MINIFS part:
MINIFS($B$2:$B$7,$A$2:$A$7,$A2,$B$2:$B$7,">"&$B2)
works by selecting the minimum date where the ID matches and the date is greater than the current date.
The IF wrapper around the MINIFS just replaces zeros with empty strings.
=IF(MINIFS($B$2:$B$7,$A$2:$A$7,$A2,$B$2:$B$7,">"&$B2)=0,
"",
MINIFS($B$2:$B$7,$A$2:$A$7,$A2,$B$2:$B$7,">"&$B2)
)
Assuming ID is in column A, the dates in column B, 10 lines entered in rows 2 to 11, and you want the highest date to be in column C, then enter:
=MAX(IF($A$2:$A$11=A2,$B$2:$B$11))
... and then copy down.
Inspired by:
https://exceljet.net/formula/max-if-criteria-match
I am trying to count the same value over multiple columns but only if they appear in a certain date in the format 'YYYY-MM'
I have gotten so far through bloody mindedness (code below) but it only looks at one column and counts them when I want to look at both columns but only if they fall on a certain date.
As an example, I have 3 columns. The first column 'A' has YYYY-MM values, the second 'B' is called Partner1 filled with names and the third column 'C' is called Partner2 again filled with names. I want to find out how many times 'Dave' (F2) appears in both columns on a certain date.
e.g. How many times has Dave been a partner in 2016-04 (A17)?
Thanks for reading.
=COUNTIFS(A2:A10,A17,INDEX(B2:C10,,MATCH(F2,B2:B10,0)),"Dave")
Date: 2016-04
no. times Dave has a partner: 3
Use 2 COUNTIFS like this -
=COUNTIFS(A2:A10, A17, B2:B10, "Dave") + COUNTIFS(A2:A10, A17, C2:C10, "Dave")
You could use:
=SUMPRODUCT((A2:A7=A17)*(B2:B7="Dave")*(C2:C7="Dave")*1)
=SUMPRODUCT((A2:A7="2016-04")*ISNUMBER(MATCH(B2:B7,{"Dave","Lisa"},0))*ISNUMBER(MATCH(C2:C7,{"Dave","Lisa"},0)))
Results:
You should use a construct like below.
=COUNTIFS(A2:A10,A17,B2:B10,"Dave",C2:C10,"Dave")
We keep track of salaries using an excel file with a tab per month:
50 = regular salary
100 = regular salary for double shift
30, 60 etc. are exceptions that don´t need to be considered
Now my boss wants to know who worked how often considering the normal and double shifts only. so the result should be a list(table) like Bob 50*X, 100*Y, Bill 50*X, 100*Y
What would the syntax look like? It´s possible that while Bill is B1 in January it might be that he is C1.. in another month so the solution should use the header row to do a lookup.
In your example, the formula
=COUNTIF(B2:B7,50)
will return the number of instances of the data 50 in the range B2:B7.
In order to find the column corresponding to a specific employee you can use MATCH, (e.g.) MATCH("Bob",B1:C1,0) which finds the exact text Bob in the range B1:C1. Now you need to change the range in your COUNTIF function to correspond to the column for Bob, which you can do with OFFSET:
=COUNTIF(OFFSET($A$2,0,MATCH("Bob",$B$1:$C$1,0),6,1),50)
The number 6 in the above formula is the number of rows containing salary data - could that change? If so you could replace it with e.g. MATCH("Tot",$B2:$A99,0)-1 which will count how many rows there are from row B to the row containing Tot.
Look up the functions COUNTIF, MATCH and OFFSET in the Excel help for more detail on how to use them.
I have an Excel spreadsheet like so:
A B
27/03/2015 Riddor
28/03/2015 Text
09/03/2015 Bees
What I am trying to do is search my column B for the word Riddor using this function:
=IF(ISERROR(MATCH("Riddor",Statistics!B:B,0)),"No Match",TODAY()-MIN(Statistics!B:B))
Within this function if the value Riddor is not found I want to show 'no match' else if the value is found I want to identify the most recent occurrence of the value Riddor in my column where its date in column A is the most recent from today. I then want to count the number of days.
So for instance my value Riddor in column B has a date of 27/03/2015. The number of days from this date to today is 5, however if I add another Riddor with a more recent date like so:
27/03/2015
31/03/2015
then I want my day count to show 1 day instead of the previous 5 days.
Can someone please show me where I am going wrong and what to do to get this working?
You will need to use a formula as defined below
Note that the flower brackets indicate that you are using this as a range formula which means you will need to hit Shift+Control+Enter and when you click on that Cell it will create the flower brackets in the end.
The below formula will retrieve the MAX Date the next part is quite simple you need to subtract from today to arrive at the difference in days. Preferably do it in another cell. I have accounted for different sheets in a modified formula at the bottom of this post. But you can test the below on the same sheet and then copy over the cell to another sheet to have it dynamically correct to account for sheet if you like. Either ways the below is tested with all events and is working
{=IF(COUNTIF(B:B,"Riddor")=0,"No Match",IF(COUNTIF(B:B,"Riddor")=1,INDIRECT("A"&MATCH("Riddor",B:B,0)),MAX(IF(B:B="Riddor",A:A))))}
Explanation
Part I - =IF(COUNTIF(B:B,"Riddor")=0,"No Match" Counts if there are any occurance of the word Riddor in that Range
Part II - IF(COUNTIF(B:B,"Riddor")=1,INDIRECT("A"&MATCH("Riddor",B:B,0)) this part accounts if there is only once occurance of the word Riddor then it uses the Match function to retrieve the date from the A Column. It would be easier with VLOOKUP but I'm assuming you dont want to change the Column Order for A & B
Part III - MAX(IF(B:B="Riddor",A:A)))) This where the Range formula is actually required. It checks in the Range B:B and Retrieves all the Dates where the B Column Matches "Riddor" and then Finds the Max date in that subset Range which would be the date closest to today's date.
Tested and Working perfectly in sample provided by your even with Multiple instances of Riddor.
Formula Accounting for the difference in Sheets not tested yet.
{=IF(COUNTIF(Statistics!B:B,"Riddor")=0,"No Match",IF(COUNTIF(Statistics!B:B,"Riddor")=1,INDIRECT("Statistics!A"&MATCH("Riddor",Statistics!B:B,0)),MAX(IF(Statistics!B:B="Riddor",Statistics!A:A))))}
I will be very grateful if someone can help me on the following task.
I have a column with date and hour and second column with values. I would like to create a new two colums, first one with date and hour but for 24 hour and second colum which to take from the values I already have for the same date and hour. Where there are no values to be return 0. For example for column2 and date2 2012-8-1 14:25 the value 6613 have to be taken from column 1 and data1 the time interval is 5 min
Interesting question though it does not make a lot of sense without the details removed at an edit. A possible but rather cumbersome solution is to use some helper columns with index numbers for use with VLOOKUP. (There may be a much better way but if so you may have to wait a bit longer for it!)
Split the first column into two (date / time) with Data > Data Tools – Text to Columns, Fixed width.
Insert two columns (say C & D) between time and value and label the left one of these 172.
For 2012 8 1 14:25 in the left column put =IF(C1=287,1,C1+1) and in the right column =A2&" "&C2.
Create the 5 minute intervals with 2012 8 1 in say G1, and formulae in the next row as below:
G2 = =G1+1/(24*12)
H2 = =IF(H1=287,1,H1+1)
I2 = =INT(G2+0.1)&" "&H2
J2 = =IFERROR(VLOOKUP(I2,D:E,2,FALSE),0)
Copy down G2:J2 as required.
Hide any columns that are obtrusive.
It looks as though graphical presentation (a scatter chart) might be more suitable than tabular format.