Simple formula

LebD

New Member
Joined
Sep 30, 2021
Messages
34
Office Version
  1. 365
Platform
  1. Windows
Hi
I am trying to have this formula working with one more criteria. Not sure why I am stuck:, initially this is working
=IFERROR(IF(LEN(VLOOKUP(C4;'Sheet2'!H:BD;5;FALSE))=0;0;VLOOKUP(C4;'Sheet 2'!H:BD;5;FALSE)/100);0)

But I need to add one more criteria, if vlookup returns >100, if true it should show 100 otherwise the rest of the formula above.

it is one more IF criteria to be inserted in the 3rd part of the formula above, theoritically like that but its not working

=IFERROR(IF(LEN(VLOOKUP(C4;'Sheet2'!H:BD;5;FALSE))=0;0;IF(VLOOKUP(C4;'Sheet 2'!H:BD;5;FALSE)/100>100;100;VLOOKUP(C4;'Sheet 2'!H:BD;5;FALSE)/100);0)
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi & welcome to MrExcel.
How about
Excel Formula:
=MIN(XLOOKUP(C4,Sheet2!H:H,Sheet2!L:L,0,0)/100,100)
 
Upvote 0
Thank you

But your formula returning 0 every time?‍♂️
 
Upvote 0
Nope sorry. It returns the values. however, some nbs are returned N/A and those who are over 100% are returned as is (like if it is 104%, it returns 104%), I need it max 100%
 
Upvote 0
the instances where it returns N/A is when the source has an X (not a nb)
 
Upvote 0
Please Try This.

Book2
ABCDE
1Test177%Test2Previous Formula
2Test269%69%
3Test377%Test4With New Criteria
4Test4105%100%
5Test526%
6Test627%
7Test799%
8Test896%
9Test967%
10Test1076%
11Test1178%
12Test1227%
13Test1339%
14Test1498%
15Test1561%
16Test168%
17Test1767%
18Test1837%
19Test1953%
Sheet2
Cell Formulas
RangeFormula
D2D2=IF(VLOOKUP(D1,A1:B19,2,0)=0,"0",VLOOKUP(D1,A1:B19,2,0))
D4D4=IF(VLOOKUP(D3,A1:B19,2,0)=0,"0",IF(VLOOKUP(D3,A1:B19,2,0)>1,"100%",VLOOKUP(D3,A1:B19,2,0)))
 
Upvote 0
The only way I can get an error with @Fluff 's formula is if the return value is text from the value column (L).
You can just wrap it in an IFERROR statement.
Excel Formula:
=IFERROR(MIN(XLOOKUP(C4;Sheet2!H:H;Sheet2!L:L;0;0)/100;100);0)
 
Upvote 0
I still have N/A but probably with an IFError it can be removed.
But the main issue now, is that if the return data is between 1 and 100, like lets say 70, it shows 100
 
Upvote 0
Yes its working, with an error it can fix it. But when the return data is over 100, it does not give me 100, but whatever the data is (108 = 108 for example)
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,928
Members
449,094
Latest member
teemeren

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