Google spreadsheet, append the first columns of all sheets into one new column - excel

I have a google spreadsheet with multiple tabs. I would like to append all the element of the first columns of all tabs into one new column. How can I do this with a formula such that I can add or remove data from first columns, and also, add tabs without ever having to touch my new column?
Sheet 1 Column A Sheet 2 Column A New Column
Bob Mary Bob
Joe Melissa Joe
Jim Jackie Jim
Mary
Melissa
Jackie

google-spreadsheet
=query({'Sheet1'!A:A;'Sheet2'!A:A}, "select * where Col1 <> ''")
Please see more info on arrays {} here, and about query funcrion here.
excel
You'll probably need to use some VBA code for this.

Related

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.

Ranking Duplicate String Values in Excel

I have a spreadsheet with string values and need to create a column with the rank (without using the rank function) of the duplicate values from another column.
Please see below for example of the desired outcome where Dupe_Rank is the created column.
Thanks!
Name
Dupe_Rank
John
1
John
2
Dave
1
John
3
Bill
1
Dave
2
let's say "Name" starts from column 'A' and row 2 as in below figure:
then add this formula:
=COUNTIF(A$2:A2,A2)
to cells below Dupe_Rank and then drag(or copy-paste) this formula to all the cells

Find repeat names in column B based on date criteria in column A

I have two columns of data in Excel. Column A is an interaction date, and column B is a name. I'm looking to devise a way to identify repeat contacts by the same name that occur within 1 day of each other. eg:
Date Name
2016/01/01 John Wayne
2016/01/01 Paul Friesen
2016/01/01 John Wayne
2016/01/01 Alex Roschenko
2016/01/02 Paul Friesen
2016/01/02 Peter Mansbridge
2016/01/02 Jake Snake
2016/01/03 Paul Feig
2016/01/03 John Wayne
Using only this sample data, the result I would be looking for is 2 (John Wayne and Paul Friesen both repeated in =< 1 day.
I'm not sure if Excel or Access are the better tool to use for this, but I'm more experience in Excel, I just haven't been able to come up with a formula...
Use a helper column.
In a blank column put the following in row 2:
=SUM(COUNTIFS(B:B,B2,A:A,A2+{-1,0,1}))>1
This will return a column of TRUE/FALSE
Then referencing the helper column we use the following array formula:
=SUM(IF($C$2:$C$10,1/COUNTIFS($B$2:$B$10,$B$2:$B$10,$C$2:$C$10,TRUE)))
Being an array formula it needs to be confirmed with Ctrl-Shift-Enter when exiting edit mode instead of Enter. If done properly then Excel will put {} around the formula.
This formula counts the unique names that have TRUE in the helper column. So no matter how many times the name has TRUE next to it, it will only be counted once.

Comparing two columns in Excel

I have data with about 15 different columns and a total of 2400 rows.
The two columns I'm interested in: (Column C = Application Owner & Column D = Application Tester). I'm trying to see which rows have the same name for both columns.
E.g.
Column C =
Mike
Bob
John
Bob
Adam
Column D =
Mike
Barry
Barry
Barry
Adam
So for this example I would like it to delete the contents of the three middle rows and only show me the first and fifth row because that is what I'm concerned with. Can anyone suggest a function of code or a function in Excel in which I can do this without actually having to go through all of them row by row?
Thanks
Add a column with something like =C2=D2 copied down to suit, filter for FALSE in that column and delete rows.
In a new Columns you can use =if(C2=D2,"DELETE","") then filter out this new column for DELETE and delete the values from column C and D or the entire range

Excel macro/formula - replace cell values if value does NOT appear in another column

I need help. I have a list of 20 names of certain consultants. I receive a new sheet daily with many names, and if one of them does not match with any of the 20 consultant names, I need to replace the cell value with "X".
E.g.
1. Consultant's list contains John and Mary.
2. Daily list contains 5 names: John, Steve, Dean, Mary and Sue.
3. I now want to replace all the cell which does NOT contain John and Mary with X (thus replace cell with names Steve, Dean and Sue with X)
Help will be appreciated
If your 20-name list is in ColumnA and the daily list in ColumnB each starting in Row1 then in Row 1 and copied down to suit:
=IF(ISERROR(MATCH(B1,A:A,0)),"X",B1)

Resources