index, small, rows .... problem

MAlhash

New Member
Joined
Mar 26, 2023
Messages
41
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have Similar problem. the first if formula before the OR is working greatly, however after or its not giving me the data which i need.
basically, I have department names in a column, each department have two values separately. for example, if the first value is zero and the second values is 1 for the debarment name, it should return department name. but if both values equal 0 it should not return the department name. so, the condition is if one of the values is =0 return department name, if both 0 do not return, if both numbers return.

for me, the formula is working like the following.
if value 1 contain number and value2 contain zero it will return department name, which is true. however, if value 1 is =0 and value 2 = number it will not return the depatment name, which is wrong. it should return.

=IFERROR(INDEX($C$17:$C$29,SMALL(IF($D$17:$D$29>0,ROW($D$17:$D$29)),ROWS(K$14:K20))-ROW($D$17:$D$17)+1), OR(IFERROR(INDEX($C$17:$C$29,SMALL(IF($E$17:$E$29>0,ROW($E$17:$E$29)),ROWS(K$14:K20))-ROW($E$17:$E$17)+1),"")))
 
Thank you for the formula, but unfortunately the Filter function is not available or activated for me. is there any other formula that can be used.
thank you
 
Upvote 0

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Ok, how about
Fluff.xlsm
ABCDEFGHI
1
2
3
4BONE & JOINT CENTER10000BONE & JOINT CENTER
5HBKMC BUILDING 32900000OPD LEVEL 1
6INTERNAL MEDICINE CLINIC00000OPD LEVEL 2
7OPD LEVEL 122000OPD LEVEL 4
8OPD LEVEL 291000OUTPATIENT DEPARTMENT
9OPD LEVEL 300100PULMONARY
10OPD LEVEL 410000QATAR METABOLIC INSTITUTE
11OUTPATIENT DEPARTMENT10100SURGICAL SPECIALTY CENTER - OUTPATIENT DEPARTMENT
12PEDIATRIC00000 
13PULMONARY02000 
14QATAR METABOLIC INSTITUTE10000
15STAFF MEDICAL CENTER00010
16SURGICAL SPECIALTY CENTER - OUTPATIENT DEPARTMENT53100
17
Master
Cell Formulas
RangeFormula
I4:I13I4=IFERROR(INDEX(B:B,AGGREGATE(15,6,ROW($B$4:$B$16)/SIGN(($C$4:$C$16>0)+($D$4:$D$16>0)),ROWS(I$4:I4))),"")
 
Upvote 0
Solution
Ok, how about
Fluff.xlsm
ABCDEFGHI
1
2
3
4BONE & JOINT CENTER10000BONE & JOINT CENTER
5HBKMC BUILDING 32900000OPD LEVEL 1
6INTERNAL MEDICINE CLINIC00000OPD LEVEL 2
7OPD LEVEL 122000OPD LEVEL 4
8OPD LEVEL 291000OUTPATIENT DEPARTMENT
9OPD LEVEL 300100PULMONARY
10OPD LEVEL 410000QATAR METABOLIC INSTITUTE
11OUTPATIENT DEPARTMENT10100SURGICAL SPECIALTY CENTER - OUTPATIENT DEPARTMENT
12PEDIATRIC00000 
13PULMONARY02000 
14QATAR METABOLIC INSTITUTE10000
15STAFF MEDICAL CENTER00010
16SURGICAL SPECIALTY CENTER - OUTPATIENT DEPARTMENT53100
17
Master
Cell Formulas
RangeFormula
I4:I13I4=IFERROR(INDEX(B:B,AGGREGATE(15,6,ROW($B$4:$B$16)/SIGN(($C$4:$C$16>0)+($D$4:$D$16>0)),ROWS(I$4:I4))),"")
Many Thank MAM it worked.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
You're welcome & thanks for the feedback.
You are more than Welcome Mam.

I have another question if it's possible!

I do not know why when I have sent the Excel sheet which I am working on from my PC to my laptop it shows me values error for all the data. Can this problem be fixed.

Thank you.
 
Upvote 0
You should not get that error with the formula I posted, as it has IFERROR to mask all errors.
 
Upvote 0
You should not get that error with the formula I posted, as it has IFERROR to mask all erro
Sorry for the long time. I had issue with my internet.
No Mam, it is not because of your formula. I have done one table and after that all my sheet become value# error.

I will attach before and after.
 

Attachments

  • before.png
    before.png
    225.4 KB · Views: 5
  • after.png
    after.png
    242.8 KB · Views: 7
Upvote 0
As that is a totally different formula & nothing to do with this thread, you need to start a new thread. Thanks.

Also I am a bloke, not woman. ;)
 
Upvote 0

Forum statistics

Threads
1,223,885
Messages
6,175,187
Members
452,616
Latest member
intern444

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