Without using VBA, is there any way to find and output the results missing from one array compared to another into cells.
I have two sheets, on Sheet1 is a list of numbers in column B and "N/A" In column J if we are done with them. On Sheet2 is we paste a list of numbers in column B. I need to be able to find the numbers missing from Sheet2 that do not have an "N/A" tag in Sheet1 and output them to column C.
I tried {=INDEX(Sheet1!B:B,MATCH(1,(Sheet1!B:B<>B:B)*(Sheet1!J:J<>"N/A"),0))} but (Sheet1!B:B<>B:B) doesn't seem to be doing what i think it should. I understand that the above formula won't give more than 1 result yet. I would need to add something to eliminate the results already in column C, but one step at a time.
Sheet1!B:B<>B:B compares corresponding cells in two sheets. Unless the numbers appear at the same exact rows in both sheets, your code will not work.
I don't think it is possible to deal with this with array formula, because Match doesn't accept an array as its first argument. But you can enter this in C1 and copy and paste to the whole column:
=IF(ISERROR(MATCH(Sheet1!B1,Sheet2!B:B,0)),IF(Sheet1!J1<>"N/A",Sheet1!B1,""),"")
There will be empty cells though.
Related
I'm trying to find a way to know how many non-empty cells are in column B, for all rows in which there is one same value in Column A.
e.g. Column A Row 1-5 is value "1", I want know how many nonempty cells are next to the value "1".
I want to do the same thing, but instead of counta, I want to do it for countif as well for columns C, and D for various values (countif(C2:C, "Banana"
The ultimate goal is being able to delete and add rows without breaking the formula and copy paste the formula to easily make new batches.
Here is my example sheet I'm working on. I can't figure out how to make vlookup or array work for me here, I'm not very good at this.
https://docs.google.com/spreadsheets/d/1PxP2pOyV916HWVGHjOsLUDwZN2lcGQ6PrBuzDqigwO8/edit?usp=sharing
Complete column A with
=ArrayFormula(lookup(row(A2:A),row(A2:A)/if(A2:A<>"",1,0),A2:A))
and then perform Pivot Table as you wish
A truncated version of my data is in the form shown in the screenshot below: three columns of 5 unique names. The names appear in any order and in any position but never repeat in a single row.
My goal is to create an array that contains the number of times Adam appears in each row. I can fill down the formula=countif(A2:C2,$I$2) in a new column, or if I write the array manually for each row, it looks like:
={countif(A2:C2,$I$2);countif(A3:C3,$I$2);countif(A4:C4,$I$2);countif(A5:C5,$I$2);countif(A6:C6,$I$2)}
Where cell I2 contains "Adam". Of course, this is not feasible for large data sets.
I know that arrays are effectively cells turned into ranges, but my main issue is that the cell I'm trying to transform already references a range, and I don't know how to tell the software to apply the countif down each row (i.e. I intuitively would like to do something like countif((A2:C2):(A99:C99),"Adam") but understand that's not how spreadsheets work).
My goal is ultimately to perform some operations on the corresponding array but I think I'm comfortable enough with that once I can get the array formula I'm looking for.
try:
=ARRAYFORMULA(IF(A2:A="",,MMULT(IF(A2:C="Adam", 1, 0), {1;1;1})))
I'm looking for a way to search within the cells in a range for a specific text value, and have them returned sorted by those values along with the corresponding cell in the next column over. For example, in column A I have the description of the item, and in Column B there is a number value:
Unsorted
These describe that particular formats (Col A) and how many of each (Col B). So what I'm looking to do is sort by multiple format, "K-7.75" and "K-20L" for example, and then return that cell along with the corresponding Column B. Is there a way I can write this all in one formula, searching for multiple strings within Col A? Here's what I'd like the output to look like, with the formulas being in A1, A9, and A13:
Sorted
I know there is a filter option, but I cant seem to use multiple strings in that and I'm looking to eliminate steps in reordering this info. I feel like there's a way to do this with Array and Search or Sort or something, but I'm stuck. Thank you in advance for any help.
Solved thanks to Kessy:
Do you know in advance the conditions you will get like "k-7.75"? If that is the case you can set every x rows or every x columns the following filter function: =FILTER(A:B, REGEXMATCH(A:A,"K-7.75")) – Kessy
=FILTER(A:B, REGEXMATCH(A:A,"K-5.16|1/6|K-20|20L|K-7.75|1/4|K-30|30L")). Using the operator character "|" as an OR logic. Thank you for putting me on the right track! – MisterSixer
I have an Excel workbook with two sheets. The first sheet contains two columns:
|| ID || FLAG ||
What I would like to do is copy only the ID's which have a flag value of one to another sheet. I know how to do this using IF statements, but this leaves spaces in the rows which do not fit the criteria. I have found heaps of ways to do it using VBA, but I would like to avoid using VBA using formulas only. I have a feeling this is achieved using Arrays, but I am not to confident with them.
Any help appreciated.
BJR
On 2nd sheet create column A "Nth match" counting up from 1 and Column B "ID".
Enter this formula into column B to pull in ID numbers.
{=INDEX(Sheet1!A:A,SMALL(IF(Sheet1!B:B=1,ROW(Sheet1!B:B)-ROW(INDEX(Sheet1!B:B,1,1))+1),Sheet2!A2))}
Sheet1 column A is your ID numbers. Sheet1 column B is your flag column, the formula checks if this criteria is met. Then the last part "Sheet2!A2" tells the formula the Nth match to display.
When you pull down formula it displays 1st, 2nd, 3rd match etc. without blanks.
Edited to answer without vba.
I have an array of cells (C2:D43) in which I want to count the number of times a particular string ("filler") occurs. However, I only want to consider the even rows in my array (so basically, the array is C2:D2;C4:D4, etc.). How can I do this? I'm working with Excel 2007.
This SUMPRODUCT formula will do it:
=SUMPRODUCT((C2:D43="filler")*(MOD(ROW(C2:D43),2)=0))
Try using MOD(ROW(),2)=0 to split up your cells so that your array has two sets: even and odd cells. Then find a way to tell Excel to choose only the values that are the opposite value of the one evaluated at the first row of the array. I'll see if I can find a way to formalize this.