Look up values equal or less than 3 based in a specific month

%3CLINGO-SUB%20id%3D%22lingo-sub-2359142%22%20slang%3D%22en-US%22%3ELook%20up%20values%20equal%20or%20less%20than%203%20based%20in%20a%20specific%20month%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2359142%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20I%20am%20looking%20for%20a%20formula%20to%20calculate%20how%20many%20records%20in%20a%20month%20are%20equal%20to%20or%20under%20a%20certain%20value%3F%20For%20example%3A%20I%20have%20a%20list%20of%20site%20visits%20which%20have%20a%20date%20in%20column%20O%20of%20when%20they%20were%201st%20notified.%20I%20have%20another%20column%20U%20where%20I%20put%20the%20date%20of%20when%20we%20got%20to%20site.%20I%20have%20calculated%20the%20difference%20between%20the%202%20dates%20in%20days%20in%20column%20V.%20I%20want%20to%20look%20to%20look%20up%20all%20the%20records%20in%20column%20O%20that%20are%20in%20a%20specific%20month%20%26amp%3B%20record%20any%20that%20have%20a%20result%20in%20column%20V%20of%20equal%20to%20or%20less%20than%203%3F%20Please%20help%3F%20I%20can%20share%20the%20worksheet%20if%20required%3F%20Many%20thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2359142%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2359221%22%20slang%3D%22en-US%22%3ERe%3A%20Look%20up%20values%20equal%20or%20less%20than%203%20based%20in%20a%20specific%20month%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2359221%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1055179%22%20target%3D%22_blank%22%3E%40Murray1985%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ESee%20the%20attached%20sample%20workbook%20for%20a%20possible%20solution.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2359230%22%20slang%3D%22en-US%22%3ERe%3A%20Look%20up%20values%20equal%20or%20less%20than%203%20based%20in%20a%20specific%20month%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2359230%22%20slang%3D%22en-US%22%3EThank%20you%20v%20much%2C%20however%20I%20can%20enter%20the%20formula%20but%20it%20doesn't%20return%20any%20values%3F%20Can%20you%20confirm%20what%20the%20ROW%20%26amp%3B%20COLUMN%20part%20of%20the%20formula%20at%20the%20end%20should%20be%20pointing%20to%3F%20I%20have%20put%20the%20formula%20below%20to%20help%20you%20with%20what%20ive%20done%20so%20far%3F%3F%3F%20Your%20help%20is%20much%20appreciated!%3CBR%20%2F%3E%3CBR%20%2F%3E%3DIFERROR(INDEX('Call%20outs'!%24O%243%3A%24O%2430%2C%20SMALL(IF(('Call%20outs'!%24O%243%3A%24O%2430%26gt%3B%3DH11)*('Call%20outs'!%24O%243%3A%24O%2430%26lt%3B%3DEOMONTH(H11%2C0))*('Call%20outs'!%24V%243%3A%24V%2432%26lt%3B%3D3)%2C%20ROW('Call%20outs'!%24O%243%3A%24O%2432)-MIN(ROW('Call%20outs'!%24O%243%3A%24O%2432))%2B1)%2C%20ROW(AB1))%2C%20COLUMN(AB1))%2C%22%22)%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2359279%22%20slang%3D%22en-US%22%3ERe%3A%20Look%20up%20values%20equal%20or%20less%20than%203%20based%20in%20a%20specific%20month%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2359279%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1055179%22%20target%3D%22_blank%22%3E%40Murray1985%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EThe%20first%20'Call%20outs'!%24O%243%3A%24O%2430%20should%20be%20the%20entire%20range%20you%20want%20to%20extract%20from.%20Unless%20you%20want%20to%20return%20just%20a%20single%20column%2C%20it%20should%20not%20be%20column%20O%20alone.%3C%2FLI%3E%0A%3CLI%3EH11%20should%20contain%20a%20date%20-%20the%20first%20day%20of%20the%20month%20you%20want%20to%20look%20at.%20In%20my%20sample%20workbook%2C%20I%20formatted%20the%20cell%20as%20mmm-yyyy.%20And%20since%20you're%20going%20to%20fill%20the%20formula%20to%20other%20cells%2C%20you%20should%20use%20%24H%2411%20so%20that%20it%20remains%20the%20same%20when%20filled%20down%20or%20to%20the%20right.%3C%2FLI%3E%0A%3CLI%3EROW(A1)%20and%20COLUMN(A1)%20should%20be%20used%20exactly%20like%20that%20in%20the%20first%20cell.%20They%20specify%20that%20the%20formula%20will%20extract%20the%20cell%20in%20the%20first%20row%20that%20matches%20the%20criteria%2C%20in%20the%20first%20column%20of%20the%20range.%20Excel%20will%20adjust%20A1%20as%20needed%20when%20you%20fill%20or%20copy%20the%20formula%20to%20other%20cells.%3C%2FLI%3E%0A%3CLI%3EFinally%2C%20you%20%3CSTRONG%3Emust%3C%2FSTRONG%3E%20confirm%20the%20formula%20with%20Ctrl%2BShift%2BEnter%20to%20turn%20it%20into%20an%20array%20formula.%3C%2FLI%3E%0A%3C%2FOL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2359299%22%20slang%3D%22en-US%22%3ERe%3A%20Look%20up%20values%20equal%20or%20less%20than%203%20based%20in%20a%20specific%20month%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2359299%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F127945%22%20target%3D%22_blank%22%3E%40Hans%20Vogelaar%3C%2FA%3E%26nbsp%3BThanks...%20ive%20got%20it%20to%20work%20but%20it%20isnt%20quite%20what%20i%20am%20looking%20for....%20I%20think%20its%20a%20countifs%20formula%20I%20need.%20For%20example%20cell%20K13%20on%20the%20%22KPI's%22%20sheet%20to%20return%20the%20number%20of%20records%20in%20column%20V%20on%20the%20%22Call%20outs%22%20sheet%20where%20the%20criteria%20in%20column%20O%20on%20the%20%22Call%20outs%22%20sheet%20is%20the%20same%20month%20as%20cell%20J11%20on%20the%20%22KPI's%22%20sheet%20and%20the%20value%20in%20column%20V%20on%20the%20%22Call%20outs%22%20sheet%20is%20equal%20or%20less%20than%203.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20attached%20a%20sample%20sheet%20to%20help%20it%20make%20more%20sense!!!%20Appreciate%20your%20help!%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hello I am looking for a formula to calculate how many records in a month are equal to or under a certain value? For example: I have a list of site visits which have a date in column O of when they were 1st notified. I have another column U where I put the date of when we got to site. I have calculated the difference between the 2 dates in days in column V. I want to look to look up all the records in column O that are in a specific month & record any that have a result in column V of equal to or less than 3? Please help? I can share the worksheet if required? Many thanks!

7 Replies

@Murray1985 

See the attached sample workbook for a possible solution.

Thank you v much, however I can enter the formula but it doesn't return any values? Can you confirm what the ROW & COLUMN part of the formula at the end should be pointing to? I have put the formula below to help you with what ive done so far??? Your help is much appreciated!

=IFERROR(INDEX('Call outs'!$O$3:$O$30, SMALL(IF(('Call outs'!$O$3:$O$30>=H11)*('Call outs'!$O$3:$O$30<=EOMONTH(H11,0))*('Call outs'!$V$3:$V$32<=3), ROW('Call outs'!$O$3:$O$32)-MIN(ROW('Call outs'!$O$3:$O$32))+1), ROW(AB1)), COLUMN(AB1)),"")

@Murray1985 

  1. The first 'Call outs'!$O$3:$O$30 should be the entire range you want to extract from. Unless you want to return just a single column, it should not be column O alone.
  2. H11 should contain a date - the first day of the month you want to look at. In my sample workbook, I formatted the cell as mmm-yyyy. And since you're going to fill the formula to other cells, you should use $H$11 so that it remains the same when filled down or to the right.
  3. ROW(A1) and COLUMN(A1) should be used exactly like that in the first cell. They specify that the formula will extract the cell in the first row that matches the criteria, in the first column of the range. Excel will adjust A1 as needed when you fill or copy the formula to other cells.
  4. Finally, you must confirm the formula with Ctrl+Shift+Enter to turn it into an array formula.

@Hans Vogelaar Thanks... ive got it to work but it isnt quite what i am looking for.... I think its a countifs formula I need. For example cell K13 on the "KPI's" sheet to return the number of records in column V on the "Call outs" sheet where the criteria in column O on the "Call outs" sheet is the same month as cell J11 on the "KPI's" sheet and the value in column V on the "Call outs" sheet is equal or less than 3.

 

I have attached a sample sheet to help it make more sense!!! Appreciate your help!

@Murray1985 

My apologies, you did mention that you wanted to count records, but then I misread the remainder of your post.

In B13:

 

=COUNTIFS('Call outs'!$O$3:$O$65,">="&B11,'Call outs'!$O$3:$O$65,"<="&EOMONTH(B11,0),'Call outs'!$V$3:$V$65,"<=3")

 

This is an 'ordinary' formula, you don't have to confirm it with Ctrl+Shift+Enter.

 

Copy to D13, F13 etc.

@Hans Vogelaar Thanks this seems to work however I have attached the spreadsheet again as for some reason even though there is no data in column v on the "Call outs" sheet, a value is returned in cells C13, E13, G13, I13, K13, W13 & Y13 on the "KPI's" sheet??? Could you help me please?

 

Thanks

@Murray1985 

There are values in column V but they have been hidden somehow.

Select V3:V4336 and select Clear > Clear Formats on the Home tab of the ribbon.