How to automatically fill up information on sheet 2 when information is input in sheet 1 - excel

I have a sheet of data whereby if the column is of certain value, it will return the whole row of data in another sheet. Example table as below.
PIC Name Phone number Gender Nationality
Ali Sad 123218972 Female US
Fahril Sam 435262626 Female US
Abu James 26426426426 Male US
I'm not too sure of the formula to output with the condition of when PIC=Ali, whole row will be returned on sheet 2. Given the extra condition of Ali might have in charged for more than 1 person. Assuming PIC is A1. Result will be as below in sheet 2
Name Phone number Gender Nationality
Sad 123218972 Female US

Related

How to cross check data in different Excel worksheets

How can I make sure that the postcode corresponding to a name in worksheet 1 matches the address for the same name in worksheet 2.
For example, I would need a column with a vlookup or index/match formula that would check Alice's postcode from worksheet 1 against Alices postcode in worksheet 2 and return true for a match of the postcode or false if the postcode is different.
Worksheet 1
Name Address DOB Post code
Alice Berlin 1980 W2
Bob London 1979 EC1
Worksheet 2
Name Address Post Code DOB
Alice London EC 1979
Alice Berlin W2 1980
I don't think a vlookup is ideal because of performance and column positioning.
I don't know if there is any other way to check that, other than VLOOKUP or MATCH function family. What I would recommend is to use the X-function family (XLOOKUP or XMATCH), this is what Microsoft recommends
For example:
=XLOOKUP(D3,$C$8:$C$9,$B$8:$B$9)=B3
Then drag down the formula.
Here is the output:
Use a IF formula
For example in Sheet2 : =IF(B5=Sheet1!B5,"True"'"False")
Here is a link that might help

How to copy a column from one sheet to another in MS- Excel, with ID as reference

I have 2 sheets in one excel file. I'd like to copy only the team column from sheet 2 to sheet 1. Both sheets have matching ID to relate to each other.
Sheet 1
id
name
address
team
123
Paul
1st street
456
Kyle
2nd Street
Sheet 2
id
name
team
123
Paul
CL
456
Kyle
BSM
And then sheet 1 will now look like this:
id
name
address
team
123
Paul
1st street
CL
456
Kyle
2nd Street
BSM
I don't know where to start. I know though that this can be done in excel, and you can do programming on it. I don't want to manually input it since it's more than a hundred records.
Okay so I am assuming all the headers are in first row. This can easily be done through Vlookup
=VLOOKUP(A2,Sheet2!A:C,3,FALSE)
Put this formula in column team in Sheet1. It will work.
Let me know if you need any further clarification.

Match multiple columns in Excel

I want to match three different columns in different sheets in Excel.
In one sheet I have Group and Name, and in another I have Name and Email.
How do I match Name in Sheet 1 with Email in Sheet 2?
Sheet 1
Group Name
A John
B Jack
C Anne
Sheet 2
Name Email
John john#
Jack jack#
Anne anne#
In Sheet2 column C, add a Group with this formula copied and dragged down:
=INDEX(Sheet1!$A$2:$B$4,MATCH(A2,Sheet1!$B$2:$B$4,0),1)
See the pic above. This should give what you are looking for.

Excel Index Partial match

I have Sheet1 with column A listing every single country in alphabetical order..
A
1 Afghanistan<
2 Albania
3 Algeria
4 American Samoa
5 Andorra
----------
228 United Kingdom
229 United States
etc
I have Sheet2 column A with empty cells with adjacent cells in column B listing address details
A B
1 empty cell Unit 3, Road;London, United Kingdom
2 empty cell Building 1, Road, TX, United States
3 empty cell 8th floor, Business Park, India 1234
etc
What I would like to know is how can I obtain the country within the address details in sheet2 column B and place them in Sheet2 column A, based on a match on the list of countries in Sheet1 column A.
Part of the problem is there is no coherent method as to how to country is placed within the address; could be at the end or in the middle of the address.
I have tried various index match formulas with no luck
any help would be appreciated.
I tried it with the reference table being in A1:B7, and lookups being A10:B10 onwards down. The formula is for these cells. You can adjust it for Sheet1/2!.
Assuming your data is in B10 onwards, and your reference data was in B1:B7, you can write this formula in A10 =INDEX($B$1:$B$7,MAX(IF(ISERROR(FIND($B$1:$B$7,B10)),-1,1)*(ROW($B$1:$B$7)-ROW($B$1)+1))). This is an array formula, so please hit Ctrl+Shift+Enter for excel to read it as an array formula.
(In the screenshot, I have pasted the table in A10:B12 as values only in D10:E12)
Text to Columns with a comma delimiter

How to SUM parts of a column which have same text value in different column in the same row

I have a column with names and a column with numbers:
FirstName Name Number
John Smith 17
John Smith 26
Peter Smith 116
Peter Smith 25
Franck Black 17
Luke Peterson 17
Luke Peterson 37
Names with same FirstName and Name represent the same person. I need to sum the numbers associated with them. I prefer not to use VBA.
A PivotTable might suit, though I am not quite certain of the layout of your data:
The bold numbers (one of each pair of duplicates) need not be shown as the field does not have to be subtotalled eg:
This can be done by using SUMPRODUCT as well. Update the ranges as you see fit
=SUMPRODUCT(($A$2:$A$7=A2)*($B$2:$B$7=B2)*$C$2:$C$7)
A2:A7 = First name range
B2:B7 = Last Name Range
C2:C7 = Numbers Range
This will find all the names with the same first and last name and sum the numbers in your numbers column
If your data has the names grouped as shown then you can use this formula in D2 copied down to get a total against the last entry for each name
=IF((A2=A3)*(B2=B3),"",SUM(C$2:C2)-SUM(D$1:D1))
See screenshot

Resources