Excel 2013 formula throws #Value! error with SAP Business Objects Dashboard - excel-formula

I am using this Excel formula
=IF(C92=0,D102,D101)
It is throwing a #Value! error for my SAP Business Objects Dashboard 4.1 (SP7).
Is there another way to write this formula?
My guess is that SAP does not like using zero for C92=0.

There are several possibilities as to the cause of the error but most will be loosely based upon the fact that you are trying to compare a numerical zero to a cell containing a text string or a blank cell. The cell may even contain a zero as text (e.g. ="0"); a numerical 0 is not the same thing as text-that-looks-like-a-zero.
If you use the VALUE function and wrap some error control around it to accommodate cases when numerical conversion is impossible then you should get consistent results.
=IF(IFERROR(VALUE(C92), 0)=0, D102, D101)
The IFERROR function is used to provide a zero when numerical conversion is not possible. This is my 'best guess' at what you want to occur. Another scenario would be to provide an outside result if not conversion is possible.
=IFERROR(IF(VALUE(C92)=0, D102, D101), "something else")
There are a number of other possibilities. If you have trouble getting the results you expect, please edit your question to include more detail on what outcome(s) you would expect for different case scenarios.

Related

EXCEL - Circular Reference Error when Entering Data

I've got another one that is really kicking my butt.
I know why the error is occurring. I just don't know how to fix it. There are a lot of IF statements so I'm thinking maybe they are arranged in a way that is causing the error. I'm sure there is a much cleaner way to write them.
Whenever I try to input data into D7 or E7 I get the circular reference error.
These are my current formulas for all relevant cells:
F7: =IF(C7<0,"FAIL",IF(OR(ISBLANK(B7),ISBLANK(C7))," ",IF(ABS(F8)<=30,"PASS","FAIL")))
G7: =IF(D7<0,"FAIL",IF(OR(ISBLANK(B7),ISBLANK(D7))," ",IF(ABS(G8)<=30,"PASS","FAIL")))
H7: =IF(E7<0,"FAIL",IF(OR(ISBLANK(B7),ISBLANK(E7))," ",IF(ABS(H8)<=30,"PASS","FAIL")))
F8: =IF(B7<0,"",IF(C7<0,"",IF(D7<0,"",IF(E7<0,"",IF(G7="FAIL","",IF(H7="FAIL","",IF(ISBLANK(B7),IF(ISBLANK(C7),"","input Lw_Lw"),IF(ISBLANK(C7),"input Lw_Up",SUM(C7-B7)))))))))
G8: =IF(B7<0,"",IF(C7<0,"",IF(D7<0,"",IF(E7<0,"",IF(F7="FAIL","",IF(H7="FAIL","",IF(ISBLANK(B7),IF(ISBLANK(D7),"","input Lw_Lw"),IF(ISBLANK(D7),"input Up_Lw",SUM(D7-B7)))))))))
H8: =IF(B7<0,"",IF(C7<0,"",IF(D7<0,"",IF(E7<0,"",IF(G7="FAIL","",IF(F7="FAIL","",IF(ISBLANK(B7),IF(ISBLANK(E7),"","input Lw_Lw"),IF(ISBLANK(E7),"input Up_Up",SUM(E7-B7)))))))))
Snip of Excel table
Any help would be much appreciated!
I worked out the following two formulas for you. Please try them.
[F7] =IF(IFERROR(ABS(F8)<=30,FALSE),"PASS","FAIL")
[F8] ==IF(ISBLANK(C7),"input "&F$3,IF(OR(COUNT($B7:$E7)<4,COUNTIF($B7:$E7,"<0")>0),"",SUM(C7-$B7)))
Copy them from F7:F8 to G7:H8.
The basic principle I applied in order to avoid a circular reference is to do all testing in row 8 with the outcome that F8 will either hold a blank or a number. Therefore "Pass" or "Fail" in row 7 can be decided based on the number: If the number is within range it's a PASS, else it's failed. Note that Abs("") will cause an error. Therefore IFERROR(ABS(F8)<=30,FALSE) will return False in case F8 = "". Effectively, this is the reverse of what I wrote in my comment above.
I looked for shorter expressions for other tests as well. Count() will only count cells with numbers in them. Therefore I use this function instead of a series of ISBLANK() queries. Similarly for COUNTIF($B7:$E7,"<0").
I used mixed absolute and relative addressing to enable copying formulas to other columns and referred to the column captions in place of repeating the same texts in the formulas.
I didn't fully test my solution. However, with my above explanation as a guide you should be able to take possession and eliminate any errors I might have left behind.

need advice about altering array formula

I wrote an Excel program in which I am using the following array formula:
{=SMALL(IF($G$2=$B$2:$B$70,ROW($B$2:$B$70)-ROW($B$2)+1),ROW(1:2))}
Although the program works as desired, at some points the involved data is a non existing item which is displayed by the usual error notation #NUM!. I would prefer that, instead #NUM! the program displays a zero or, better still, a text such as "non existing". Please advise.

Combining multiple IF-statements into one formula

I am constructing a formula to act as an extra 'control cell' for my excel worksheet.
The if statements in text with the expected result:
If D2=0 and E2=0 and F2=0 =>""
If D2=0 and E2>0 and F2=0 =>"m of m2"
If D2>0 and E2>0 and F2=0 =>"m2 of m3"
If D2>0 and E2>0 and F2>0 =>"m3"
If D2>0 and E2=0 and F2>0 =>"m2"
If D2=0 and E2>0 and F2>0 =>"m2 of m3"
If D2=0 and E2=0 and F2>0 =>"m"
If D2>0 and E2=0 and F2=0 =>"m"
I'll converting this formula to vba afterwards, but my knowledge of vba is pretty limited so I like to start with just the excel formula.
Thanks in advance.
*edit: so far the formula always returns "m3" so it acts like all the cells are >0 even if they are empty/have a 0 value.
Formula so far (it's in dutch so als=if)
=ALS(D3=0&E3=0&F3=0;"";ALS(D3=0&E3>0&F3=0;"m of m2";ALS(D3>0&E3>0&F3=0;"m2 of m3";ALS(D3>0&E3>0&F3>0;"m3";ALS(D3>0&E3=0&F3>0;"m2";ALS(D3=0&E3>0&F3>0;"m2 of m3";ALS(D3=0&E3=0&F3>0;"m";ALS(D3>0&E3=0&F3=0;"m";""))))))))```
One way to interpret your table of results is that the value is equal to 0 or its not. your table does not cover the possibility of of values being less than 0. With this understanding one possible NESTED IF function would be:
=IF(D2=0,IF(E2=0,IF(F2=0,"","m"),IF(F2=0,"m of m2","m2 of m3")),IF(E2=0,IF(F2=0,"m","m2"),IF(F2=0,"m2 of m3","m3")))
Alternatively in excel you could use the CHOOSE function. Since each result is unique and its based based on binary results you could use the following formula to generate an index number from 1 to 8:
1+(F2>0)+(E2>0)*2+(D2>0)*4
Drop that in a CHOOSE function and its much more shorter manageable then nested IF. It could look as follows:
=CHOOSE(1+(F2>0)+(E2>0)*2+(D2>0)*4,"","m","m of m2","m2 of m3","m","m2","m2 of m3","m3")
now not being a VBA guru either, I am not sure how CHOOSE would translate over to VBA. But that would be another question!
UPDATE: ALTERNATE IF function
=IF(AND(D2=0,E2=0,F2=0),"",IF(AND(E2=0,D2<>F2),"m",IF(AND(D2=0,E2>0,F2=0),"m of m2",IF(AND(E2>0,D2<>F2),"m2 of m3",IF(AND(D2>0,E2=0,F2>0),"m2","m3")))))
There are many ways to go through the logic. In this case I was able to group the IF functions by results.

Excel formula using Concatenate has too few arguments

I've got a formula which works great while referencing a single cell in Google Spreadsheets. When I carry it over to Excel, however, there are apparently not enough arguments ("you've entered too few arguments").
I've dug up all the info on Spreadsheets I can, but none of the functions appear to be foreign to Excel and I don't see any missing arguments, which means the formatting might be off somehow but after playing around with it I can't seem to find resolution.
Formula:
=Concatenate(if(A24<10,1,ROUNDDOWN((A24-1)/4-1)),if(OR(A24<10,(mod(A24-1,4)-1) <0),"d","d+"),ROUNDDOWN(if(A24<10,-(10-A24+2)/2,mod((A24-1),4)-1)))
Here's the section that gets highlighted after the error (the "1" between the asterisks):
=Concatenate(if(A24<10,1,ROUNDDOWN((A24-1)/4-**1**)),if(OR(A24<10,(mod(A24-1,4)-1) <0),"d","d+"),ROUNDDOWN(if(A24<10,-(10-A24+2)/2,mod((A24-1),4)-1)))
The purpose of this is to convert a static number in a single cell (i.e. 10) into a value in dice plus pips (i.e. 1d, 2d+2, etc.). This has no relation to statistics; the formula is built with its own scaling for a specific purpose.
Thanks for your help and the learning experience!
In Excel use:
=CONCATENATE(IF(A24<10,1,ROUNDDOWN((A24-1)/4-1,0)),IF(OR(A24<10,(MOD(A24-1,4)-1) <0),"d","d+"),ROUNDDOWN(IF(A24<10,-(10-A24+2)/2,MOD((A24-1),4)-1),0))
ROUNDDOWN in Excel requires two arguments. number and places. Note the ',0' added after each of the ROUNDDOWNs. In Google places is optional. If not entered '0' is assumed.

How to parse cells and remove selected data from excel

I have this as a few cells in excel 2010:
(source: gyazo.com)
There are a few things I am trying to accomplish, though they're really all variations of the same thing.
In both Price Paid and Price Returned, I have values that can either be formatted as "# (type)" or as an expression of the form "# (type)+# (type2) ...". What I'm trying to do is reduce the expressions from their current state into just numerical values. I've figured out how to do it if it is just the first case ("# (type)"), however I'm having issues with doing the second case, since the parse stops after the first instance of " ". Below I have the code that I'm using in both Numerical Paid and Numerical Returned. The ISNUMBER category is there just to show which things register as numbers and which don't.
Numerical Paid and Numerical Returned Code:
=INT(IF(ISNUMBER(D2),D2,LEFT(D2,FIND(" ",D2,1)-1)))
I did some more google searching and found that someone had already written a VBA function to do this. Lovely.
I've linked the source below.
http://www.vbusers.com/code/codeget.asp?ThreadID=624&PostID=1
All I had to do was replace the ".," with "+-/*", so that it'll handle all operations. Simple, elegant, and useful. Afterwards, I used the solution posted here (as an answer to another one of my questions):
How to make a cell equal to the value of an expression in another cell (Excel 2010)?
to evaluate the resulting string.
Thanks everyone.

Resources