problem of syntax in function indirect hlookup - excel

I did this function in excel, and it works perfectly :
=RECHERCHEH(H$3;INDIRECT("'"&parametre!$B$3&"["&parametre!$B$4&"]"&parametre!$B$5&"'!$1:$200");LIGNE();0)
But when I try to replace
$1:$200 per
=RECHERCHEH(H$3;INDIRECT("'"&parametre!$B$3&"["&parametre!$B$4&"]"&parametre!$B$5&"'!RECHERCHEV(C5;parametre!$B$7:$C$11;2)");LIGNE();0)
it doesn't work.
when I isolate my function rechercheV, I got it :
=RECHERCHEV(C5;parametre!$B$7:$C$11;2)
and it returns me :
AF:BE
So i try to put in my function rechercheV in my "big function" but no way to work for the moment
Can you help me pls ?
Thanks for reading me

The quotes around RECHERCHEV(C5;parametre!$B$7:$C$11;2) mean that exactly that text "RECHERCHEV(...." is being interpreted for the formula, not the value that the function would return.
Try this:
=RECHERCHEH(H$3;INDIRECT("'"&parametre!$B$3&"["&parametre!$B$4&"]"&parametre!$B$5&"'!"&RECHERCHEV(C5;parametre!$B$7:$C$11;2));LIGNE();0)

Related

IfError with else, does this function exist in Excel?

While trying to help the author of this other question, I bumped (again) into the situation that I would like the following Excel function:
=IFERROR(value, value_if_error, value_if_no_error)
In other words, I'm looking for an IFERROR() function with an else-clause.
The issue is: it can in theory be done as follows:
=IF(IFERROR(function(),error_value),value_if_error,value_if_no_error)
But what if error_value is a possible outcome of function()? That would make it impossible to use IFERROR(): e.g. function() returns a string, which can be anything, also an empty string, but it might also generate an error.
Edit: some clarification
Let me give an example:
=IFERROR(B3, "weird")
In "B3", there is a function, which returns a string, but even in case the value of this string is "weird", this is ok. How can I distinguish the erroneous case and the case where "weird" is a normal correct result?
As an image says more than a thousand words:
Next to IFERROR(), there also is the ISERROR() function, which can be used as an input for an IF()-clause:
=IF(ISERROR(value),value_if_error,value_if_no_error)

Works perfect but cell does't update

This is the formula I'm using in Excel sheet.It works fine but doesn't update sometimes and sometimes does what can be the reason
=IF(F3=1,SUM(INDIRECT(ADDRESS(CELL("row")-12,6))),IF(F3=2,SUM(INDIRECT(ADDRESS(CELL("row")-12,6)):INDIRECT(ADDRESS(CELL("row")-12,6+1))),SUM(INDIRECT(ADDRESS(CELL("row")-12,6)):INDIRECT(ADDRESS(CELL("row")-12,6+2)))))
You can get away from all the volatile functions with INDEX:
=SUM(INDEX(F:G,ROW()-12,IF(F3=1,1,0))
The formula:
=IF(F3=1,
SUM(INDIRECT(ADDRESS(CELL("row")-12,6))),
IF(F3=2,
SUM(INDIRECT(ADDRESS(CELL("row")-12,6)):INDIRECT(ADDRESS(CELL("row")-12,6+1))),
SUM(INDIRECT(ADDRESS(CELL("row")-12,6)):INDIRECT(ADDRESS(CELL("row")-12,6+2)))
)
)
can be written simpler as:
SUM(INDIRECT(ADDRESS(CELL("row")-12,6 + IF(F3<=2,F3-1,2)))))
But this does not solve the problem.... 😉

How to generate a random string RANDBETWEEN?

I'm using this formula to generate a random code:
=RANDBETWEEN(0,9)&CHAR(RANDBETWEEN(65,9))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(33,47))&RANDBETWEEN(0,9)&CHAR(RANDBETWEEN(65,9))&CHAR(RANDBETWEEN(97,122))&CHAR(RANDBETWEEN(33,47))
Instead of something that looks like this:6Ib&4Rj/, I get
NAME? error
Anybody can see where I'm missing something?
RANDBETWEEN requires the first argument to be less than the second argument.
Replace all instances of RANDBETWEEN(65,9) with RANDBETWEEN(9,65) and that should fix your problem.

How to correct an Excel formula error

=O27&" "&IF(D27<>"",VLOOKUP(D27,성취기준1반!$B$4:$C$19,2)&" ","")&IF(E27<>"",VLOOKUP(E27,성취기준1반!$E$4:$F$19,2)&" ","")&IF(F27<>"",VLOOKUP(F27,성취기준1반!$H$4:$I$19,2)&" ","")&IF(G27<>"",VLOOKUP(G27,성취기준1반!$K$4:$L$19,2)&" ","")&IF(H27<>"",VLOOKUP(H27,성취기준1반!$N$4:$O$33,2)&" ","")&IF(I27<>"",VLOOKUP(I27,성취기준1반!$Q$4:$R$33,2)&" ","")&IF(J27<>"",VLOOKUP(J27,성취기준1반!$T$4:$U$33,2)&" ","")&IF(K27<>"",VLOOKUP(K27,성취기준1반!$W$4:$X$33,2)&" ","")&IF(L27<>"",VLOOKUP(L27,성취기준1반!$Z$4:$AA$33,2)&" ","")&IF(M27<>"",VLOOKUP(M27,성취기준1반!$AC$4:$AD$19,2)&" ","")&P27
this is working code
=O28&" "&IF(D28<>"",VLOOKUP(D28,성취기준1반!$B$4:$C$19,2)&" ","")&IF(E28<>"",VLOOKUP(E28,성취기준1반!$E$4:$F$19,2)&" ","")&IF(F28<>"",VLOOKUP(F28,성취기준1반!$H$4:$I$19,2)&" ","")&IF(G28<>"",VLOOKUP(G28,성취기준1반!$K$4:$L$19,2)&" ","")&IF(H28<>"",VLOOKUP(H28,성취기준1반!$N$4:$O$33,2)&" ","")&IF(I28<>"",VLOOKUP(I28,성취기준1반!$Q$4:$R$33,2)&" ","")&IF(J28<>"",VLOOKUP(J28,성취기준1반!$T$4:$U$33,2)&" ","")&IF(K28<>"",VLOOKUP(K28,성취기준1반!$W$4:$X$33,2)&" ","")&IF(L28<>"",VLOOKUP(L28,성취기준1반!$Z$4:$AA$33,2)&" ","")&IF(M28<>"",VLOOKUP(M28,성취기준1반!$AC$4:$AD$19,2)&" ","")&P28
this is doesn't workin code.
Why doesn't it work?
This is not an answer in terms of a solution, but an answer in terms of the method you could employ to find and solve the issue. Mainly because you have not provided a working verifiable example, data or detail of the actual error.
First I would remove the vlookups and replace them with the expected results - if that then functions as it should then each of the vlookups needs to be tested, if not then check the detail of the function.
Appreciate if you can assist by explaining.. "why this doesn't work?" part. It is an error message or the the expected value is _ but I got _ instead.. (:
One thing I noticed is that you don't define what will be the outcome if D28 is "". If you don't define it, it'll return 'FALSE' value instead of a String/text.
In your IF() function, you only say IF(d28<>"",<DisplayValueFrom성취기준1반>) it should be IF(d28<>"",<DisplayValueFrom성취기준1반>,<DisplaySomeThingElse>)

Error invoking a formula

I'm trying to invoke following formula in one of the cells in my excel worksheet.But I'm getting an error
as Invalid formula.
=IF(myfunction("EUR CURNCY","INVERSE_QUOTED") ='Y', myfunction("EUR CURNCY","LAST_PRICE"),1)
Note:myFunction is my custom function.I believe the problem is above is the syntax.
Could you advise please?
Thanks.
A single quoted string is not a valid string literal.
Replace
=IF(myfunction("EUR CURNCY","INVERSE_QUOTED") ='Y', myfunction("EUR CURNCY","LAST_PRICE"),1)
by
=IF(myfunction("EUR CURNCY","INVERSE_QUOTED") ="Y", myfunction("EUR CURNCY","LAST_PRICE"),1)
If that doesn't fix the problem, please post the code for myfunction.

Resources