Return selected data from large list - Criteria dependant

ExcelRoy

Well-known Member
Joined
Oct 2, 2006
Messages
2,540
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I am trying to return data on particular jobs from a large list on another sheet in the workbook

If the user enters a job no. into G5 then I would like data returned relevant to that job only

I have the following

C7;C10000 is the Date Entered
D7:D10000 is the unique employee no.
E7:E10000 is the employee name
F7:F10000 is the job no. worked on
G7:G10000 has job information
H7:H10000 has the hours worked

I was hoping to use something similar to that from below but not sure if this can be done?


=IF(H7="","",SUMIFS('TimesEntry'!H$7:H$15898,'TimesEntry'!D$7:D$15898,H7,'TimesEntry'!G$7:G$15898,G5,'TimesEntry'!$C$7:$C$15898,">="&$AD$7,'TimesEntry'!$C$7:$C$15898,"<="&IF($AD$8="",EOMONTH($AD$7,0),$AD$8)))

Many thanks for any help
 
Last edited:
Hi Aladin,

sorry but the formula doesn't seem to work

I have done exactly how you have said but can not get it to work
I have tried it s an array formula and still nothing

I have noticed that when I drag from G6 to H6 the G5 turns to H5 which should'nt be the case, this should always stay as G5 that said I have tried with G5 alo and still nothing

Thanks

Misplaced paren:(...

G5 is a job number.

G6, just enter, copy to H6, and down:

=IFERROR(INDEX(TimesEntry!C$7:C$20, AGGREGATE(15,6,(ROW(TimesEntry!$F$7:$F$20)-ROW(TimesEntry!$F$7)+1)/(TimesEntry!$F$7:$F$20=$G$5),ROWS(G$6:G6))),"")

Adjust to suit.
 
Upvote 0

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
hi Aladin,

Does this formula work on Excel 2007?

Thanks
 
Last edited:
Upvote 0
hi Aladin,

Does this formula work on Excel 2007?

Thanks

If you get a #NAME? error, it won't.

Try instead...

G6, control+shift+enter, not just enter, copy across to H6, and copy down:
Rich (BB code):
=IFERROR(INDEX(TimesEntry!C$7:C$20,SMALL(IF(TimesEntry!$F$7:$F$20=$G$5,
  ROW(TimesEntry!$F$7:$F$20)-ROW(TimesEntry!$F$7)+1),ROWS(G$6:G6))),"")
 
Upvote 0
Simply put, Perfect results

Many thanks for your time and patience

Have a great Christmas & new year!
 
Upvote 0
Hi Again Aladin,

Sorry, but could I ask one more question

If the formula returns a "0" could this return a "" instead? Is this possible

Thanks
 
Upvote 0
Hi Again Aladin,

Sorry, but could I ask one more question

If the formula returns a "0" could this return a "" instead? Is this possible

Thanks

Format the formula cells as:

[=0]"";General

If this not satisfy, where would you get 0 - in G or in H?
 
Upvote 0
Hi Aladin,

it would be in column G

Thanks

G6, control+shift+enter and copy down:
Rich (BB code):
=IFERROR(1/(1/INDEX(TimesEntry!C$7:C$20,SMALL(IF(TimesEntry!$F$7:$F$20=$G$5,
  ROW(TimesEntry!$F$7:$F$20)-ROW(TimesEntry!$F$7)+1),ROWS(G$6:G6)))),"")
 
Upvote 0
Hi Aladin,

Many thanks, but this returns "" to all from column G

Thanks
 
Upvote 0

Forum statistics

Threads
1,216,113
Messages
6,128,904
Members
449,477
Latest member
panjongshing

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top