how to populate an excel cell using multiple =IF function - excel

I have a column that displays data in each cell.
What i want to do in another column is display certain figures based on the data in the other column
eg:
Column W Column X
-0.5 0
564.3 564.3
5000 >4800
If the data in column W is equal or less than 0 i want the number in column X to read zero.
If the data in Column W is greater than 0 but less than 4800 i want the number displayed in Column X to read the same number as in column W, and
If the data in Column W is greater than 4800 i want the number in Column X to read >4800.
I have =IF((AND(W222>4800,W222<0)),">4800","0") working so far to the less than 0 and greater than 4800, just can't get the numbers greater than 0 and less than 4800 to display in column X.

Consider:
=IF(W222>4800,">4800",MAX(W222,0))

Try this
=IF((AND(W222>4800,W222<0)),">4800",IF((AND(W222<4800,W222>0)),W222,"0"))

Thanks for the responses. I have the numbers in Column W >4800 displaying >4800 in Column X, and the numbers below 0 in Column W showing 0 in Column X using =IF(W222>4800,">4800",MAX(W222,0))
what i need now is that if a number in Column V is >0 i need the cell in Column X to show "+IVE" but still have the same responses to the
=IF calculation above.

Reminding u - "-7" is at "W3",
This works for u!!

Related

Return Multiple Unique Matches in Excel without Array Formula

Given an Excel table of shape
Col. A Col B Col. C Col. D Col. E
x 2 x 2 3
x 3 y 7
y 7 z -5
x 2
z -5
I want to return the first unique hit in Column B for argument "x" in Column D,
the second unique hit in Column B for argument "x" in Column E and so forth.
The formula I'm currently using in cell D1 for this is
{=IFERROR(INDEX($B$1:$B$5,MATCH(0,COUNTIF($C1:C1,$B$1:$B$5)+($A$1:$A$5<>$C1),0)),"")}
which is working.
The problem I'm having is that since this is an array formula and since I'm analyzing a decent amount of data computation time for my sheet is too high.
Is there an alternative for this functionality avoiding an array formula?
Thanks!
Haven't got time to test this properly, but if you have Excel 365 you can use a single formula per row and it may be faster:
=TRANSPOSE(UNIQUE(FILTER(B1:B10,A1:A10=C1)))
in D1.
EDIT
To pull the formula down, you need static references as OP has pointed out. Probably should check for empty cells in column C as well, so formula becomes:
=IF(C1="","",TRANSPOSE(UNIQUE(FILTER(B$1:B$10,A$1:A$10=C1))))

Excel Formula if the value of a cell in one column stays the same but the value in another changes then show me

I hope you can help. In Screen Shot 1. You can see that the number 4424383
in column Y appears 6 times from row 2 to row 7
In column U you can see the numbers 12345 and 76259 and they also appear from rows 2 to 4 and 5 to 7
What I need is a formula that can produce a piece of text that says "Investigate" in column Z, if the number in Column Y stays the same but the number in Column U changes.
If you look at Screen Shot 1 you will see the green number 4417458 in column Y and the green number 76260 in column U this DOES NOT need to be investigated.
Like wise with the purple numbers
Its only when the HUB_PARTY_ID or Y number continues to be the same but then the MTNG_ATNDEE_ID or U column number changes that I need "investigate" to appear in the Z column.
as always any and all help is greatly appreciated.
Screen Shot 1
This should do it:
=IF(Y2=Y1,IF(U2<>U1,"Investigate","Cool"),"Cool")
You can use the below formula starting with the third row of column Z
=IF(AND(Y3=Y2,U3<>U2),"Investigate","NA")
Result:

How to select certain rows in Excel that meet logical criteria of A & B

I have an excel sheet in CSV that has 8 columns A-H and thousands of rows with values 0 or 1 depending on truth value.
I'm looking for the Excel function in which I can select rows where column A and B are true so that I can check another columns probability given A&B. IE P((A&B)|D) (where | means given).
I'm really new to excel and having difficulties finding how to only select rows that meet this criteria.
The following formula entered in I1 will return a 1 if both A1 and B1 are true.
=IF(AND($A1=1,$B1=1),1,0)
Copy it down or autofill to identify all rows where A and B are true.
The $ sign before A and B make the column references absolute meaning if you drag the formula to the right, the references to columns A and B will remain.
Because Excel implicitly interprets 0 = FALSE and 1 (or any other number) = TRUE the formula could be shortened to:
=IF(AND($A1,$B1),1,0)
The probability of C being 1 given that A and B are 1 can be calculated by counting all rows where A, B and C are all 1 and dividing by the number of rows where both A and B are 1:
=COUNTIFS($A:$A,"1",$B:$B,"1",C:C,"1")/COUNTIFS($A:$A,"1",$B:$B,"1")
Again, references to A and B are absolute, while C is relative so you can drag right to get probabilities for columns D to H.
COUNTIFS only counts the rows where all of the criteria are met and allows you to specify up to 127 range/criteria pairs.
EDIT
You could also use:
=AVERAGEIFS(C:C,$A:$A,1,$B:$B,1)
to get the probability.

Excel how to change column numbering by adding a number to the column

I need to drag cells which equal values of columns which have a distance of for example 4 columns horizontally. Is there any way to add a number for example in column A to get column E?
Example:
A B C D E F G H I J K
1 2 2 3 4 1 5 6 9 1 2
I need the values only of columns A, E and I in other cells which are at the right of these cells without leaving empty cells and by dragging horizontally.
A wax to do this is to change the numbering of the columns from letters to numbers (file->options->formulas->work with formulas-> tick the first field Column Line).
Then the programming with numbers is easier than using commands to change the column letters in numbers and vice versa. To change the column letters into numbers can also be done with thefunction column. However the inverse function of this is a combination of functions and it is quite difficult to do.

Find last non-zero cell's column reference in an UNORDERED range of values

I have a range with numbers in a row in Excel, say:
A B C D E F G H I J K L
Line 1 => 0 0 0 3 2 8 3 6 0 0 0 0
All cells are non-blank but some contain zeros and some contain numbers. Also, the range cannot be ordered in either ascending or descending order.
I need a formula (not VBA) that will return the column of the last non-zero value in the range (i.e. column 8 for cell H1 above). I can get the actual value of cell H1 with this formula:
LOOKUP(2,1/(A1:A10<>0),A1:A10)
but I cannot find a way to get the column number for that cell.
Any ideas?
You are very close:
=LOOKUP(2,1/(A1:L1<>0),COLUMN(A1:L1))
Enter
=MAX(IF(YourRange=0,0,COLUMN(YourRange)))
as an array formula (CTRL-SHIFT-ENTER).
For me, the best solution for numeric values was this:
=IF(D497<>0,D497,IF(D496<>0,D496,IF(D495<>0,D495,IF(D494<>0,D494,IF(D493<>0,D493,D492)))))
it gives the last non zero value, for your require range that you can make by adding further rows to the formula.

Resources