function - In Excel: Return nth largest value in a group of numbers given constraints -


i wondering if following excel question:

if have 3 columns, column containing tweet texts, column b containing number of impressions tweet has generated, , column c containing date of tweet - output following things without using vba or pivot tables if can:

  • produce table top 10 tweets impressions on selected date range
  • the table should have tweet text in 1 column, , associated impressions in second column.

essentially want nth largest value given date constraints, , return value tweet text alongside it.

i have been looking =large(if()) function haven't been successful far, have suggestions?

assuming 100 rows of data (change required) , required date range defined in e2 (start date) , e3 (end date), use "array formula" in g2 numbers:

=large(if(c$2:c$100>=e$2,if(c$2:c$100<=e$3,b$2:b$100)),rows(g$2:g2))

confirm ctrl+shift+enter , copy down g11

then in f2 text:

=index(a$2:a$100,small(if(b$2:b$100=g2,if(c$2:c$100>=e$2,if(c$2:c$100<=e$3,row(b$2:b$100)-row(b$2)+1))),countif(g$2:g2,g2)))

confirm ctrl+shift+enter , copy down f11


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -