Return Value based on 2 criterias - excel

ive noticed that similar question has been answered before but non are what i am looking for.
Sheet 1
Site Program Data Finished
A1001 B3
A1001 B5
A1001 B6
A1002 B3
A1003 B6
A1003 B5
Sheet 2
Site Location Date Released Program Data Finished
A1001 Chicago 1/3/2018 B6 6/5/2016
A1002 Chicago 1/4/2018 B3 1/3/2018
A1001 Chicago 1/1/2018 B3 4/5/2016
A1001 Chicago 1/2/2018 B5 1/1/2018
A1003 Chicago 1/5/2018 B6 4/5/2016
A1003 Chicago 1/6/2018 B5 1/1/2018
A1004 Chicago 1/7/2018 B4 1/2/2018
i need to return the Date Finished Values from Sheet 2 under Date Finished in Sheet 1 based on 2 criterias: the Site and Program.
So look for Site A1001 with B3 program under sheet 2 and return the Date Finish in sheet 1.
i'm stuck.... i have this formula but its not doing the job.
=IFNA(IF(VLOOKUP(VLOOKUP($A2290,[Capital Projects.xlsx]Modification'!$D:$D,1,0),'[Capital Projects.xlsx]Modification'!$D:$I,6,0)="5GmmW", VLOOKUP($A2290,[Capital Projects.xlsx]Modification'!$D:$EG,55,0),""),"")

Using structured references, with Table1 being the table on sheet2:
=AGGREGATE(14,4,(Table1[Site]=A2)*(Table1[Program]=B2)*Table1[date finished],1)
You can use regular references instead of a Table, but just ensure they cover more than the expected number of rows.

Related

Identify type of data based on first couple of characters in a cell

I have a range of 412 cells (A1: A412). Each cell has a string of data that I OCR'd and exported to Excel. It is a list of names and addresses.
I need VBA code that will loop through each cell, look at the first 5 or 6 characters and determine if the string of text is a Name, Address or City (state&zip) and transpose that data out.
I have code that will transpose the data after every n number of rows, but the data does not get exported this way. Ex: the name might take up two different cells, but I want to merge those two cells in the process.
For example: public information from a state government source
CURRENT LIST (Sheet 1):
Cell A1: A. E. Ewell Investment Co.
Cell A2: P.O. Box 27
Cell A3: Ardmore, OK 73402
Cell A4: Aimie A. Akers, Trustee of the Howard A.
Cell A5: and Aimie A. Akers Revocable Joint Trust
Cell A6: Agreement dated 5/03/1996
Cell A7: 11 Nichols Road
Cell A8: Luray, VA 22835
Cell A9: Alison Evans Taylor
Cell A10: And James Andrew Taylor
Cell A11: 1523 Glenwood Avenue
Cell A12: Oklahoma City, OK 73116
Result: (Sheet 2):
Cell A1: A. E. Ewell Investment Co. Cell B1: P.O. Box 27 Cell C1: Ardmore, OK 73402
Cell A2: Aimie A. Akers, Trustee of the Howard A. and Aimie A. Akers Revocable Joint Trust Agreement dated 5/03/1996 Cell B2: 11 Nichols Road Cell C2:Luray, VA 22835
Cell A3: Alison Evans Taylor and James Andrew Taylor Cell B3: 1523 Glenwood Avenue Cell C3: Oklahoma City, OK 73116
I know this is very specific and there needs to be rules in place, but I just need the base code and I'll implement the rules.

how to get data added and deleted from two data frames when compared

I have two dataframes which is data we have is monthly data , in month data can be added and deleted when compared with other month data , i want column added in which added and other deleted.
example june output
customer region
a1 us
a2 us
b1 uk
b3 china
b4 aus
Example july output
customer region
a1 us
a2 taiwan
a3 india
b1 uk
b3 china
b4 india
b4 aus
b2 japan
output should be
delete region addedcustomer detedcus addedregion
us a1
a2 taiwan
us a3 india
b3 china
b4 india
b2 japan

Multiple What IF Statement in Excel for Soccer score project

I have a long list of soccer data but in it's most simplistic form it looks like this:
A1 Barcelona
A2 Madrid
A3 2
A4 1
A5 (this will be the IF Statement)
There are over 200 rows but all with the same premice, so what I want is an if statement that says if the score in A3 is larger than A4 then A5 has a W and if A4 is a larger score than A3 than A5 has an L
Can someone give me some pointers as to how to do this, only need to know it for the top line of the data and then I can replicate throughout
Thanks
Dan
Try this if statement:
=IF(A3>A4,"W",IF(A4>A3,"L",IF(A3=A4,"Tie","")))

finding Minimum value based on a range of values in another column in excel vba

10.00 b1
11.00 b2
22.00 b3
2.00 b1
323.00 b2
1.00 b3
423.00 b1
32.00 b2
42.00 b3
43.00 b1
522.00 b2
53.00 b3
22.00 b1
344.00 b2
33.00 b3
23445.00 b1
323.00 b2
4.00 b3
How can I find the minimum value of column1 where value of column2 = b2?
Here, I got one for you. It is an excel formula.
=MIN(IF(B1:B100="b2",A1:A100))

Sum fields in a column if there is an entry in a corresponding row in another column

Assume the following data:
| A B C
--+------------------------
1 | 2 3 5
2 | 2 3
3 | 4 4
4 | 2 3
5 | 5 6
In cell A6, I want Excel to add cells C1, C2, C3 on the basis that A1, A2 and A3 have data in. Similarly, I want B6 to add together C1, C4 and C5 because B1, B4 and B5 have data.
Can someone help?
In A6 enter:
=SUMPRODUCT(($C1:$C5)*(A1:A5<>""))
and then copy to B6:
A simple SUMIF formula will work
=SUMIF(A$1:A$5,"<>",$C$1:$C$5)
Place that formula is cell A6 and then copy it to B6.
You can create another column, e.g. AValue, with the formula =IF(ISBLANK(A1),0,A1) in it. This will return 0 if the cell in A in the corresponding line is empty, or the value from the cell in A otherwise.
Then you can just sum up the values of the new column.

Resources