Triple (nested) if-formula Excel 2010 - excel-formula

Trying to work out how to set up this nested if-formula.
I've got 3 different dates, and i want the formula to pick date x first, when this is empty, get y, and if that turns up empty, get date z.
I've tried it with =IF(z2="";aa2;z2;IF(aa2="";v2;aa2)) and this gives me the error that i'm adding to much arguments.
Date x = cell Z2
Date y = cell AA2
Date Z = Cell V2
The reason I'm asking this question is because i keep having a hard time with these types of formula and hoping to find someone who could explain what I'm doing wrong, or that my approach is wrong.

Either use
=IF(Z2="";IF(AA2="";V2;AA2);Z2)
or
=IF(Z2<>"";Z2;IF(AA2<>"";AA2;V2))
Let me know if anything is not clear.

Related

Excel cell text need to separate based on days and months

I have cell value with 115y300d which needs to be move to separate cell, however in few cell I have data like 10h30m, so it's mixed text.
What I want to do is value before "y" should go in Year Column "d" in Days, similar for h = hours and M in Minutes. Since it is not in similar format, I'm not able to do text to columns and other functions, and need your help.
You could use find() to do things like so:
=if(iferror(find("y",A2,1)>0,0),left(A2,find("y",A2,1)-1,"")
which will put the value before y into the cell or set it to blank.
Expand the idea to find d & y etc
One option could be:
Formula in B1:
=DROP(WRAPROWS(TEXTSPLIT(CONCAT(BYROW(A1:A5,LAMBDA(a,IF(RIGHT(a)="d",a&"hm","yd"&a)))),,{"y","d","h","m"},,""),4),-1)
If you hit CONCAT() limits, you can also do this by row (dragging):
=TEXTSPLIT(IF(RIGHT(A1)="d",A1&"hm","yd"&A1),{"y","d","h","m"},,,"")

Using IsNumeric Function in a Formula

I was wondering if anyone had any suggestions for what I'm doing wrong, or if it's even possible.
I am working with 3 columns:
Column X = # of Services, Column Y = # of Bills, and Column Z which is a calculation of X divided by Y.
Sometimes, there is a text entry in Column X - when that happens, I want Column Z to simply reflect what Column Y contains.
Here is the code I've written... I've tried (seemingly) all possible combinations of quotation marks and parentheses, to no avail.
ActiveCell.FormulaR1C1 = _
"=IF(IsNumeric(RC[-2]),=RC[-2]/RC[-1],=RC[-1])"
Thank you!
Your formula is wrong, use this:
ActiveCell.FormulaR1C1 = "=IF(IsNumber(RC[-2]),RC[-2]*RC[-1],RC[-1])"
Note that IsNumeric is a VBA function and its equivalent in Excel functions is IsNumber. Sometimes functions have different names for Excel and VBA, this is one of the cases.

vlookup from different tables dependent on a drop down list

So I've been asked to make a 'skills matrix' using excel and seem to be struggling with the logic somewhat. I have created a dropdown list (x,y,z), each of the options refers to a different dataset. For example, if I were to select 'x' from the list I would like to return data, using vlookup, specifically from the relevant table. The intention is to create a form which will return people and skills based on the initial selection.
I'm currently using
=IF(ISERROR(SEARCH("x",$B$1)),"",VLOOKUP(P13:$P$16,$P$2:$S$16,1)) which works ok if I select 'x'.
So basically I'm looking for something which will work like:
If x then vlookup from table x, elif 'y' then vlookup from y, else z
If anyone can help me I'd be much obliged.
What I would do is the following, with a single search of a single value as I am not 100% sure I got what you want to achieve :
Use the name manager to build a name for each of your data range to search through (X Y and Z) and give them a convenient name, for example X_Range, Y_Range, Z_Range
Type in cell B1 the range to search (X, Y or Z)
Type in cell B2 the value to look for
Use the following formula to search cell B2 in the proper range you indicate in B1
=VLOOKUP(B2;INDIRECT(B1 & "_Range");2;FALSE)
INDIRECT is the key. It will allow you to resolve the string that is build with the range name and the literal "_Range" as a range name...
Hope that helps

Excel's COUNTIF doesn't work

I'm at my wits end trying to troubleshoot COUNTIF
I see there are three instances of 11.0.6000.0162 but =COUNTIF(A1:A8559,B1) doesn't believe this.
And I evaluated the cells
=A1=B7 = TRUE
=A2=B7 = TRUE
=A5=B7 = TRUE
I have been trying to run larger figures and now I know why the numbers don't quite add up .... Thanks!
UPDATE
Here is new set of data. I thought =COUNTIF($A$1:$A$20,B1) would work, but I'm still having problems
Assuming column A contains all your data, B contains the certain numbers you wish to count and C1 is where you will post the formula
=COUNTIF(A:A,B1)
will work if you write the number in B1 in exactly the same format as it would be in the list.
You could then drag the formula down from C1 as far as needed.

excel formulation without VBA for sum of variable quantity of numerical values

I need to sum the vehicle and max hr intersection set for each subsystem. In other words I need to sum value of TRUEs and print the sum in the 1st FALSE which is above these TRUEs.
For example:
D1 = B2
D3 = B4+B5+B6+B7
D8 = B9+B10+B11
This is a simplified version of my real requirement. There exist thousands of data in my file. I don't know VBA. I also don't know which functions to use in this case, if it's possible to solve this without VBA.
which function(s) should I try?
regards.
You can use something like that:
=IF(C1=FALSE;SUM(B2:B11)-SUM(D2:D11);"")
It sum ALL the number and subtract all the othr sum below...
Copy and paste for every cells. Make attention to NOT fix the cell ($) otherwise don't work...
It's NOT a very good solution, but work.

Resources