If (stmt) > False > Eval next row - excel

I am trying to populate a table with SKU codes from another sheet in my workbook. I need to use an if statement that cycles through a column and passes over a value if it evaluates false. Essentially, I want to populate a second table with SKUS but absolutely NO blank SKUS - this is where the cycling comes in.
In Table 1 (T1), col A contains the line number that the SKUs run on. Col B of T1 contains the SKU code. T1 is not sorted and never will be so there are many different arrangements of lines and SKUs. T2 is set up the exact same way: col A is the lines and col B is the SKUs; however T2 is only concerned with lines 51 and 56. So, I need to populate the SKUs into col B of T2 by checking to see if col A of T2 matches col A of T1, if they match then I want col B of T1 to populate col B of T2 (only one cell not whole column), but if they don't match I don't want to populate 0 or a false SKU, I want the formula to keep checking down col A of T1.
I cannot find a way to do this non-macro and I need to avoid macros because the workbook will be passed down to people without knowledge to preserve/modify macros.
Following is my thought process:
=IF(A1 of T2 is found in col A of T1, B1 of T2 = B(row# of matching col A cell), skip to next row and evaluate all records in col A T1)

Related

String compare value and pull exact value of cells from other columns and copy to new cell

I am trying to make a statistics table for a set of data and would like a formula that would find exact matches in string values in a particular column and pull the data from another column of that row if there is a match.
Basically, if "Name_1" appears in column X, copy the value of column Z from that row and paste it to a new cell.
=IF(AND(Data!N:N,"*Name_1*",Data!O:O,"*HE*"),
VLOOKUP(AND(Data!N:N,"*Name_1*"),Table2,15,FALSE))
I have multiple conditions that I would like the formula to check first before pulling the data.
If the cell in column N contains the name & if column O contains "HE" THEN,
copy value of cells found in column O (without repetition).
EDIT:
I am keeping track of the number of times (for example), CH appears in column N and the string value of the cell in the next column O. So I have a counter that counts every time CH appears - and the type of human error that has occurred (which is data in Column O).
Example of expected output:
USERS
ERROR TYPE
CH
HE1
KL,LT
HE3
CH
ABC
CH, KL, LT
HE1,HE2
Here, total count for CH is 3, with 2 involving HE1 and HE2 and 1 involving ABC (based on example).
Count for KL is 2 involving HE1, HE2 and HE3
Count for LT is 2 involving HE1, HE2 and HE3.

Increment cell by 1 per new row added with specific data

I have a data table which is a list of items, and each item can be chosen from a drop-down menu.
I want to have a cell that will increment by one for each item that is being added to the list with a specific value.
In somewhat of a coding way:
U2 = FOREACH(Cell in Column C that equals "X") => increment by one;
U3 = FOREACH(Cell in Column C that equals "Y") => increment by one;
Where X and Y can be chosen from a drop-down menu I've created for column C.
Any ideas?
If I'm understanding your problem correctly: C2 = COUNTIF($C$1:C2,C2)+1
This will give you the count of items thus far in the list with the value of C2 plus 1 (I think that's what you mean incremented by 1?).
If I misunderstood and you just want to know that each row is the nth time the item appears in the list then: C2 = COUNTIF($C$1:C2,C2)

VBA Create filter for multiple columns

good night!
I'm new in VBA and my english isn't that good so, please, be patient with me =D
Since I'm new, I always did simple loops, with one column. I never had to do a filter before. So I confess I have no idea where to begin. But I'll try my best to explain, so please, help me because it's really important to me.
I need to create a loop in the first 5 columns with this logic:
1 - Search all 5 columns and create a filter;
2 - Filter: Get all rows of column A where value == 1 And all rows of column B where value == 1 And all rows of Column C where variable == 'C' And all rows of column D where values == 1 And all rows of column E where value == 1 and create another sheet(1) with all rows of the filter;
3 - Do loop 2 again, but with "J" on column "C", and create another sheet (2);
The logic is: I need to create one sheet with all the rows that I set in the filter.
Example: Find all rows on the Columns where Column A = 1 & Column B = 1 & Column C = F & Column D = 1 & Column E = 1 -> Create one sheet with all rows with this values
Just like that:
Note this: because I have Column C with "F" in a row and "J" in another row, I need to create one sheet with all rows that contains each letter.
Could you help me, please?
Thanks and have a great night!

Sum of multiple columns if they match

I have this table of data:
A B C D E
003B1016 1 003G1016 1 003B1016
003G1015 1 003G1391 2 003G1015
003H0121 4 003H6208 2 003H0121
003H6209 1 003H6209 1 003H6209
I want to sum B+D if A and C are identical , how would i do that?
I have another 32000 rows of data. :) Thanks for the help
Put this in cell E1 and copy down:
=IF(A1=C1,B1+D1,"")
This says - if A = C, then add B+D. Otherwise, return blank "".
EDIT for new requirements
In order to add all amounts from column B where column A matches the current row and from column D where column C matches that row, where the row in column A exists anywhere and the row in column C exists anywhere, do the following formula in E2 and drag down:
=IF(ISERROR(MATCH(A2,A$1:A1)),IF(ISERROR(MATCH(A2,C:C,0)),"",SUMIFS(B:B,A:A,A2)+SUMIFS(D:D,C:C,A2)),"")
This says: look above the current row in column A - have we seen this item before? If no, continue with the formula. If yes, ignore, to avoid double counting. Then, Look at all of column C - does the value in the current row of A occur anywhere in column C? If no, then don't add anything. If yes, Add all items from column B where column A matches the current row, and add all items from column D where column C matches the current row.

Using COUNTIFS with a range as criteria

I have a situation where in I have to use COUNTIFS(range1, Criteria1, Range2, Criteria2...), where criteria should be a range in the same excel that has text in it. Is there a way for that?
My actual situation is
Sheet 1 : col A and Col B - Text values
Sheet 2 : Col C and Col D - Text values
For every value in Col A, check if it is there in Col C, the take the corresponding value from Col D and check if it is the same in Col B. I need the count of how many matches or doesn't match. I tried to use Vlookup on this, but couldn't get what I wanted. I appreciate your suggestions on this.
Thanks,
Ramya
The example uses a Named Table.
{=COUNT(IF(([#ColA]=[#ColC])*([#ColD]=[#ColB]),1))}
COUNT method counts the number of values.
([#ColA]=[#ColC])*([#ColD]=[#ColB]) compares the current row's Column A value against Column C value, then returns True/False then the same thing for Column D value against Column B value, and multiplies them together to get:
True
from True * True
or
False
from True * False or False * True or False *False`)
And when the IF statement is True, it returns 1 to be used in the COUNT.
You can use an Array Formula to calculate whether a specific row in a table matches your criteria, then add the ones that do match up.
Ctrl + Shift + Enter to create the Array Formula.

Resources