I am trying to use Excel without a macro to achieve a task trivial with a macro.
I want to check over a column and only select unique values from that column, I am using the following function I found online to do this:
=IFERROR(INDEX(list,MATCH(0,COUNTIF(A$2:$A2,list),0)),"")
This function works as expected, however I wish to extend this function and I'm not sure how.
Once I find the next unique value using above, I also want to make an additional check from a row in the same column.
As an example, if the next unique value is found in row 3 I want to check if the value in column B row 3 is "Yes".
Can anyone point me in the right direction for this?
Subject to the fact that I don't understand the formula you are happy with (so may not have understood the question) if you have labels in Row1 then in Row2 and copied down:
=IF(AND(COUNTIF(A:A,A2)=1,B2="Yes"),"Found","")
might suit your purposes.
Related
I am trying to create a formula that will look at a cell and test the value in that cell against an array or multiple arrays of cells, and if a match is found, take another action like calculate a mathematical formula.
Really the action taken afterwards is not the issue, just used as a reference of what I ultimately intend to do with the formula. The biggest hurdle I am having is the first part of the formula where I need to test values.
I need to test the employee ID's in column W against the same employee ID's located in the "doors" columns and see if there is a match, and if there is, do another action.
Formulas I have tried, though I really don't know what I should be doing here:
{=IF(W5=T4:T7,"true")}
{=IF(OR(F4:F7,H4:H7,J4:J7,L4:L7,N4:N7,P4:P7,R4:R7,T4:T7)=W6,"True")}
Any help would be appreciated. Please let me know if I need to elaborate.
Use MATCH for one column:
=IF(ISNUMBER(MATCH(W6,$T$4:$T$7)),X6/5000*1000000,0)
For multiple columns:
=IF(ISNUMBER(AGGREGATE(15,7,ROW($B$4$:$T$7)/($B$4$:$T$7=W6),1)),X6/5000*1000000,0)
I have a question I'm hoping someone in the community may be able to help me answer.
Here's my issue, I'm trying to use the COUNTIF function to determine how many times a particular value appears. Easy enough right? Here's the tricky part, I want to only count certain values from each row. Only retaining the count for a particular value from each row. Per row there should only be a max of (1) error type counted. Screenshot below for more context.
Example
Insert a helper column to track the highest priority error. In your helper column use the following formula and copy down as required. If you prefer a blank over the word none when no errors are found, change "None" to "".
=IFERROR("P"&AGGREGATE(15,6,RIGHT(E2:J2,1)/(E2:J2<>""),1),"None")
In my example below I place the helper column in column D, but it can be any column.
In D16:E16 I used the following formula and copied right
=COUNTIF($D$4:$D$13,E$15)
Hy Every Body, I have two excel sheets name as "Blotter" and "Opportunity", I want to use "Vlookup" Function in Opportunity so that I can find out which opportunity is available in the blotter sheet. Please take a look at the Blotter sheet as under
In the Column B the Opportunities are available.
Now please look at the opportunity sheet.
In the opportunity sheet I am using this function.
=IF(D2 = "","",VLOOKUP(D2,blotter,10,0))
It working fine with first five rows but later it start duplicate the same value multiple time, because behind these cell on the blotter sheet the column B has Piad/place status instead of opportunity. So it duplicate the next opportunity. I have tried many tricks like match, index, but in vain.
I know it can be fixed. I have google it and also try to find it via youtube but unable to fix it.
I don't think it can be done without an intermediate column. The position of the next value in the lookup key depends on where the position of the last successful lookup was, so in a way the lookup chain is path dependent and I don't think you can build path dependency with any ease inside an Excel formula.
In the below example you get something akin to what I think you want by calculating how many spaces there are to the next valid lookup key in Column C, and then doing an Offset in column D. In column C I use an indirect which generates path dependency based on the sum of the cells above itself. You would need to apply similar principles to your example, should only need a single equivalent of my column C.
Formulas as follows:
Column C: =MATCH("OPP",INDIRECT("A"&SUM($C$1:C1)+2&":A50"),0)
Column D: =OFFSET($B$1,SUM($C$1:C2),0)
I'm making a basic inventory list for my place of work and want to make it easier for future inputs and changes. So far I have inputted all of the model numbers for our inventory, and I was wondering how I could assign a price to the model number, so that it automatically fills it into the cell two cells right. I'm also working with around 50 model numbers, so it would be a lengthy function.
Example:
B E
778740 125.99
778739 120.99
778740
Is there a way that the second "778740" could be automatically filled in? I'm fairly new to excel and I can't find this problem, although I know it is very simple and exists. Even if some one could link me it that would be very much appreciated. Thank you!
Suppose your headers are in row 1, model numbers in column A and prices in column B. You could use the following formula in cell B3 and drag it on down as far as you need. Then what you fill in in column A matches something above, the cell next to it will automatically populate. And otherwise it stays blank, letting you know it is on you to fill it in (though once you do, the formula will no longer be there, so if you later fill in a match above, the magic is gone).
=iferror(indirect("B" & (1+match(A3,A$2:A2,0))),"")
The match function returns an error if nothing is found, and ifError will handle that by leaving your cell blank. If a match is found, we get the value from the corresponding row in column B.
I'm using Excel 2010 and have a datasheet with multiple tabs, this is the current SUMIF function that I am using
=IF(SUMIF('Master Data'!$J$2:$J$200,'Resource View (2)'!B22,'Master Data'!$W$2:$W$200)>0,Current_row_different column, "")
Basically, I find some rows in the other sheet that have a value of 1 I then want to use these rows that have a value of 1 but use a different column within that row to populate the true condition.
So say for instance row 4 contains a 1 at column A I then want to stay on row 4 but get the value of column B for the true condition.
Is this possible?
EDIT:
I have now managed to get the function working however its a bit of an Excel hack, because I have had to move the columns around in the master data and its a bit messy now anyway here's what I've got
=IF(SUMIF('Master Data'!$C$2:$C$200,'Resource View (2)'!B22,'Master Data'!$W$2:$W$200)>0,VLOOKUP(B22,'Master Data'!$C$2:$F$90,3,FALSE),"")
Now I know this is because VLOOKUP searches through the first column specified and it doesn't seem to work at all if i try to put the range in backwards i.e. $F$90:$C$2 instead of $C$2:$F$90. Is there any way to manipulate VLOOKUP to work like this?
Yes, actually there is a way - a brother of VLOOKUP - it's INDEX(MATCH()). It is a very useful tool, as you can look at any column and return any other, not only looking at the first one to return the ones to the right. Also, INDEX(MATCH()) can be used in forming array formulas, if you need that, while VLOOKUP cannot.
Basically, this part of your formula:
VLOOKUP(B22,'Master Data'!$C$2:$F$90,3,FALSE)
would be changed with this:
INDEX('Master Data'!$E$2:$E$90,MATCH(B22,'Master Data'!$C$2:$C$90,FALSE))
So, after all, the equivalent for
=IF(SUMIF('Master Data'!$C$2:$C$200,'Resource View (2)'!B22,'Master Data'!$W$2:$W$200)>0,VLOOKUP(B22,'Master Data'!$C$2:$F$90,3,FALSE),"")
would be
=IF(SUMIF('Master Data'!$C$2:$C$200,'Resource View (2)'!B22,'Master Data'!$W$2:$W$200)>0,INDEX('Master Data'!$E$2:$E$90,MATCH(B22,'Master Data'!$C$2:$C$90,FALSE)),"")