Formula retuning #Value!

Liz_I3

Well-known Member
Joined
Dec 30, 2002
Messages
647
Office Version
  1. 2016
Platform
  1. Windows
Hi
The below formula was working until I added the And for a second condition.
Names, Man and Cat are all name ranges on sheet 2. The formula is on sheet 1
I did enter is with the ****f,Ctrl , Enter but it is returning a #Value!

What am I missing?

=IF(ROWS(U$3:U3)<=$T$3,INDEX(Names,SMALL(IF(AND((Man=$U$2,Cat=$T$2),ROW(Man)-ROW(sheet2!$O$3)+1),ROWS(U$3:U3)),1),""))

Thanks
L
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
Having 'two' Paranthesis after AND(( does not look right.

Example;

=IF(AND(A1=x,B1=y),TRUE,FALSE)
 
Upvote 0
Thanks that got rid to the #Value!, but now it is not returning the correct value. It is just selecting the first name in the range. It should be looking for only the name that match my 2 coditions.

=IF(ROWS(U$3:U3)<=$T$3,INDEX(Names,SMALL(IF(AND(Man=$U$2,Cat=$T$2),ROW(Man)-ROW(Sheet2!$O$3)+1),ROWS(U$3:U3)),1),"")

L
 
Upvote 0
Try stepping through the formula with Formula Evaluate. Can be very useful to help identify where a parenthesis belongs or not
 
Upvote 0
If I copy the formula down to the next row instead of getting a name I get the #Num!. When I click on the trace formula it tells me it has encountered existing arrow or a circular reference. I do not see a circular reference and do not know how to remove the arrows

L
 
Upvote 0
Hi
The below formula was working until I added the And for a second condition.
Names, Man and Cat are all name ranges on sheet 2. The formula is on sheet 1
I did enter is with the ****f,Ctrl , Enter but it is returning a #Value!

What am I missing?

=IF(ROWS(U$3:U3)<=$T$3,INDEX(Names,SMALL(IF(AND((Man=$U$2,Cat=$T$2),ROW(Man)-ROW(sheet2!$O$3)+1),ROWS(U$3:U3)),1),""))

Thanks
L
Try...

=IF(ROWS(U$3:U3)<=$T$3,INDEX(Names,SMALL(IF(Man=$U$2,IF(Cat=$T$2,ROW(Man)-ROW(INDEX(Man,1,1))+1)),ROWS(U$3:U3)),1),""))

T3 must house something like:

=SUM(IF(Man=$U$2,IF(Cat=$T$2,1)))

Both formulas need confirming with control+shift+enter...
 
Upvote 0
Thanks Aladin
That worked!!!! I was concentrating so hard on the Index formula I never gave any attention to my countif which is in T3. It was only counting the Man field not the Cat

Thanks again
L
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,787
Members
452,942
Latest member
VijayNewtoExcel

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