Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-05-2018, 08:46 AM
garymon9AX garymon9AX is offline SMALL function with multiple IF statements (or alternative suggestion) Windows 10 SMALL function with multiple IF statements (or alternative suggestion) Office 2013
Novice
SMALL function with multiple IF statements (or alternative suggestion)
 
Join Date: Feb 2018
Posts: 9
garymon9AX is on a distinguished road
Default SMALL function with multiple IF statements (or alternative suggestion)

Hi, I am new to this forum and this is my 1st post for help.


I have outlined the problem below and in the attached Word document.

I have a data table with 4 columns of data:
Job number (Column A), visit date Column B), Job type (Column C), Status (Column D).

Also an answer table with columns E to K.

I want to return the date occurrences in 1st, 2nd, 3rd etc order, that relate to aaprticular Job number, that also meet certain Job type and Status criteria.
This is described further in the attached document.

I have tried the function 'SMALL' with multiple 'IF' statements, but can't get it to work.

This example is an extract of a larger spreadsheet with much more data variations in the descriptions in columns C and D.

If someone could give me the formula I need to enter in cells G3:K4, that gives me the date occurrences I need, I would be most grateful.

Forgive me if I have not got the forum etiquette or format correct. I am new to this. Any advice would be welcome.
Thank you.
garymon9AX
Attached Files
File Type: docx Excel Forum Query.docx (15.4 KB, 10 views)
Reply With Quote
  #2  
Old 02-05-2018, 08:53 AM
xor xor is offline SMALL function with multiple IF statements (or alternative suggestion) Windows 10 SMALL function with multiple IF statements (or alternative suggestion) Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,100
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

Welcome!

Please press Go Advanced and upload your Excel file. It is cumbersome to enter all your data.
Reply With Quote
  #3  
Old 02-05-2018, 09:24 AM
garymon9AX garymon9AX is offline SMALL function with multiple IF statements (or alternative suggestion) Windows 10 SMALL function with multiple IF statements (or alternative suggestion) Office 2013
Novice
SMALL function with multiple IF statements (or alternative suggestion)
 
Join Date: Feb 2018
Posts: 9
garymon9AX is on a distinguished road
Default SMALL function with multiple IF statements (or alternative suggestion)

Thanks xor.
My apologies.
I have now attached the spreadsheet.

Regards,
garymon9AX
Attached Files
File Type: xlsx Forum Query.xlsx (10.4 KB, 11 views)
Reply With Quote
  #4  
Old 02-05-2018, 09:44 AM
xor xor is offline SMALL function with multiple IF statements (or alternative suggestion) Windows 10 SMALL function with multiple IF statements (or alternative suggestion) Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,100
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

What about Job number in A8?
Reply With Quote
  #5  
Old 02-05-2018, 09:55 AM
xor xor is offline SMALL function with multiple IF statements (or alternative suggestion) Windows 10 SMALL function with multiple IF statements (or alternative suggestion) Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,100
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

Maybe like the attached. Be aware that it is array formulas.
Attached Files
File Type: xlsx Job_Number.xlsx (11.1 KB, 11 views)
Reply With Quote
  #6  
Old 02-05-2018, 09:59 AM
garymon9AX garymon9AX is offline SMALL function with multiple IF statements (or alternative suggestion) Windows 10 SMALL function with multiple IF statements (or alternative suggestion) Office 2013
Novice
SMALL function with multiple IF statements (or alternative suggestion)
 
Join Date: Feb 2018
Posts: 9
garymon9AX is on a distinguished road
Default SMALL function with multiple IF statements (or alternative suggestion)

Ah yes sorry xor, I forgot to mention that.
There are some jobs with an 's' prefix which would also need to be ignored (as with the suffix hyphen and it's following numbers).
We need to match only the part of the job numbers after any 's' prefix and before the hyphen.
Thanks for your patience with the newbie

Regards,
garymon9AX
Reply With Quote
  #7  
Old 02-05-2018, 10:16 AM
garymon9AX garymon9AX is offline SMALL function with multiple IF statements (or alternative suggestion) Windows 10 SMALL function with multiple IF statements (or alternative suggestion) Office 2013
Novice
SMALL function with multiple IF statements (or alternative suggestion)
 
Join Date: Feb 2018
Posts: 9
garymon9AX is on a distinguished road
Default

Thanks xor, that is great.
I am not familiar with those functions so could never have got there. It took me hours of fumbling before joining this forum and posting the problem. So I am impressed with the speed of your response.

At the risk of being cheeky - is there a way of making the formula remove the 's' prefix on the job number at 'A8' rather than manually removing it?
I say this because the data table is populated from a query run separately for different customers, so the data will change frequently and the 's' prefixes are a common factor that will crop up often.
This extra part of the solution would make it perfect.

Regards,
garymon
Reply With Quote
  #8  
Old 02-05-2018, 11:22 AM
xor xor is offline SMALL function with multiple IF statements (or alternative suggestion) Windows 10 SMALL function with multiple IF statements (or alternative suggestion) Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,100
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

I attach a new file where I have made helper cells in N2:N15. You can hide this column if you want or move it (not copy) to another place out of sight.

Are you aware that array formulas like thos in G3:K4 must be entered in a special way. Normally you just press Enter to complete a formula. Array formulas must be entered by holding down Ctrl and Shift before pressing Enter. If you do it correctly Excel will automatically put braces {} around the formula. When you have entered one array formula correctly you can copy it to other cells in the normal way. Don't try to enter the {} manually. If you edit an array formula you must again hold down Ctrl and Shift before pressing Enter.
Attached Files
File Type: xlsx Job_Number_2.xlsx (11.3 KB, 11 views)
Reply With Quote
  #9  
Old 02-05-2018, 11:37 AM
garymon9AX garymon9AX is offline SMALL function with multiple IF statements (or alternative suggestion) Windows 10 SMALL function with multiple IF statements (or alternative suggestion) Office 2013
Novice
SMALL function with multiple IF statements (or alternative suggestion)
 
Join Date: Feb 2018
Posts: 9
garymon9AX is on a distinguished road
Default

Hi xor,

That is excellent. Thank you so much.

I can now work with this to produce the report I need, to keep my customer happy.
Thanks for the advice about entering array formula, I'll take care with that.
Much appreciated. Have a good evening.

Regards,
garymon9AX
Reply With Quote
  #10  
Old 02-05-2018, 12:00 PM
xor xor is offline SMALL function with multiple IF statements (or alternative suggestion) Windows 10 SMALL function with multiple IF statements (or alternative suggestion) Office 2016
Expert
 
Join Date: Oct 2015
Posts: 1,100
xor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to allxor is a name known to all
Default

That's fine.

If you extend your data below row 15 remember to extend the formula in the helper column (column N) similarly (and of course the references in all formulas in G3:K4).
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
SMALL function with multiple IF statements (or alternative suggestion) Multiple If statements, Jamal NUMAN Excel 16 11-15-2022 11:59 PM
Need help with Indexing and Small Function in MS Excel 2010 msp2sxs Excel 3 11-07-2017 03:46 PM
LARGE function with 3 IF statements??? FloorManager Excel 3 08-23-2017 01:06 PM
Alternative for Multiple If Conditions? zguan1 Excel 2 05-25-2017 09:12 AM
Multiple If statements bremen22 Excel 2 10-15-2013 06:37 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:50 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft