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),"")))
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Please post some sample data.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
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),"")))

in the picture below bones is = 1,0,0,0,0 it should return the department name
 

Attachments

  • preview.jpg
    preview.jpg
    188.4 KB · Views: 16
Last edited:
Upvote 0
Can you please post some sample data (not an image) as requested.
 
Upvote 0
In that case can you simply copy/paste some data from Excel to the board.
 
Upvote 0
In that case can you simply copy/paste some data from Excel to the board.
Table Slicers on Excel Dashboards
BONE & JOINT CENTER10000
HBKMC BUILDING 32900000
INTERNAL MEDICINE CLINIC00000
OPD LEVEL 122000
OPD LEVEL 291000
OPD LEVEL 300100
OPD LEVEL 410000
OUTPATIENT DEPARTMENT10100
PEDIATRIC00000
PULMONARY02000
QATAR METABOLIC INSTITUTE10000
STAFF MEDICAL CENTER00010
SURGICAL SPECIALTY CENTER - OUTPATIENT DEPARTMENT53100

when i have used this formula, it has returned me this table. pulmonary for example is missing. because first value is zero , but it have number 2 in the second value so pulmonary should be shown

=IFERROR(INDEX($C$17:$C$29,SMALL(IF($D$17:$D$29>0,ROW($D$17:$D$29)),ROWS(K$14:K14))-ROW($D$17:$D$17)+1),"")

Table Slicers on Excel Dashboards
BONE & JOINT CENTER
OPD LEVEL 1
OPD LEVEL 2
OPD LEVEL 4
OUTPATIENT DEPARTMENT
QATAR METABOLIC INSTITUTE
SURGICAL SPECIALTY CENTER - OUTPATIENT DEPARTMENT
 
Upvote 0
Thanks for that.
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:I11I4=FILTER(B4:B16,(C4:C16>0)+(D4:D16>0))
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,115
Members
453,021
Latest member
Justyna P

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