How to merge two of the same excel sheet with different data - excel

I want to be able to do this without the use of copy and paste, because there's way too many data on each, and would take hours or even days to finish. Here's an example of what I want to happen.
| Name | Street | Number |
John Blue RD 147
Red RD
George Yellow RD 543
PLUS
| Name | Street | Number |
Blue RD
Paul Red RD 352
Ringo 368
EQUALS
| Name | Street | Number |
John Blue RD 147
Paul Red RD 352
Ringo 368
George Yellow RD 543
And blank spaces are suppose to happen, thanks to anyone who has a solution to this, I've searched everywhere and couldn't find anything.

you can make a 3rd sheet in which each cell will be a function of the two.
For example, the A1 cell will contain:
=IF(ISNA(Sheet1!A1),Sheet2!A1,Sheet1!A1)

Related

How to reference another cell in a chart based on an aggregating total in another cell

So, the title might be confusing, so I'll outline like this:
I am making a weightloss chart. One of the clients gets to open a bag of legos as a reward for every 2lbs that he loses, as long as he does it based on a goal progression. For instance, if he weights 260, and loses 2lb, he gets his reward. However, if he gains a lb, now he has to lose 3lb to get his reward.
Currently, I have charts that look like this:
Column O
Column P
Current Weight
Amount Lost
263
8
Column L
Column M
Next Lego Bag
261
Lbs until next bag
2
After he hits 261, I want that cell that says 261 in Col M to say "259". So if he weighs in again, I want it to look like this automatically.
Column O
Column O
Current Weight
Amount Lost
260.5
10.5
Column L
Column M
Next Lego Bag
259
Lbs until next bag
1.5
What is the best way to automatically make that cell in Column M change when he hits the 2lb goal? I have a table that basically states all the goal weighs he needs to hit for each reward. It looks like this:
| Column Z | Column AA | Column AB | (formatting is being weird)
| -------- | -------- | -------- |
| Bag | Target Weight | Amount Lost |
| Bag 5 | 261 | 8 |
| Bag 6 | 259 | 10 |
| Bag 7 | 257 | 12 |
| Bag 8 | 255 | 14 |
| Bag 9 | 253 | 16 |
etc
I've tried a few things, but I'm coming up blank, because it won't always be in whole numbers the amount he loses, so matching it to the target weight has been tough.
In really, really simple terms, I need it to basically say this:
If current weight > goal 1, then A1 = goal 1. If current weight < Goal 1, then A1 = Goal 2, and all the way to Goal 21. However, A1 can't change to the next goal until current weight is less than that goal.
Thanks all
I have tried IF statements and Floor statements to get an ongoing changing thing, but it's not working.
In M2: =IF(MOD(O2+1,2)=0,2,MOD(O2+1,2))
In M1:
=O2-M2
Or using O365 in M1:
=LET(m,MOD(O2+1,2),
lbs,IF(m=0,2,m),
VSTACK(O2-lbs,lbs))

Separating lines with multiple values in one cell to individual lines in excel [duplicate]

This question already has answers here:
Unnest (explode) a Pandas Series
(8 answers)
Closed 2 years ago.
I have a data set (csv file) of names that list names with number of people with that name, their "rank" and the name itself.
I am looking for a way to separate all the names into single lines ideally in excel - but maybe something in pandas is an option.
The problem is that many of the lines contain multiple names comma separated.
the data looks like this.
rank | number of occurrences | name
1 | 10000 | marie
2 | 9999 | sophie
3 | 9998 | ellen
...
...
50 | 122 | jude, allan, jaspar
I would like to have each name on an individual line alongside its correspondent number of occurrences. Its fine that the rank is duplicated.
Something like this
rank | number of occurrences | name
1 | 10000 | marie
2 | 9999 | sophie
3 | 9998 | ellen
..
...
50 | 122 | jude
50 | 122 | allan
50 | 122 | jaspar
Use df.explode()
df.assign(name=(df.name.str.split(','))).explode('name')
Way it works
df.name=# Equivalent of df.assign(name=
df.name.str.split(',')#puts the names in list
df.explode('name')# Disintegrates the multiple names into one per row
rank number of occurrences name
0 1 10000 marie
1 2 9999 sophie
2 3 9998 ellen
3 50 122 jude
3 50 122 allan
3 50 122 jaspar
In [60]: df
Out[60]:
rank no name
0 50 122 jude, allan, jaspar
In [61]: df.assign(name=df['name'].str.split(',')).explode('name')
Out[61]:
rank no name
0 50 122 jude
0 50 122 allan
0 50 122 jaspar

MS EXCEL: Remove Empty (Rows) Lines Across Multiple Columns

With the use of a MS Excel Formula; I would like an array formula that will remove blanks rows across multiple columns.
Unfortunately and unlike the use of other similar formulae (i.e., =INDEX($B$3:$B$10,SMALL(IF(ISBLANK($B$3:$B$10),"",ROW($B$3:$B$10)-MIN(ROW($B$3:$B$10))+1),ROW(A1))) and alike these formulas only allow the removal of blank lines from a single column. Whereas, I am attempting to achieve the same results but the removal of blank lines from columns across multiple rows.
EXAMPLE:
(A2) John Doe | (B2) New York | (C2) NY
(A3) BLANK | (B3) BLANK | (C3) BLANK
(A4) Jane Doe | (B4) Baltimore | (C4) MD
(A5) BLANK | (B5) BLANK | (C5) BLANK
(A6) Mary Jones | (B6) San Francisco | (C6) CA
(A7) BLANK | (B7) BLANK | (C7) BLANK
(A8) BLANK | (B8) BLANK | (C8) BLANK
(A9) William Jones | (B9) BLANK | (C9) IL
RESULTS:
(A2) John Doe | (B2) New York | (C2) NY
(A3) Jane Doe | (B3) Baltimore | (C3) MD
(A4) Mary Jones | (B4) San Francisco | (C4) CA
(A5) William Jones | (B5) BLANK | (C6) IL
This function should work:
{=IFERROR(INDEX($A$2:$C$10,MATCH(1,(COUNTIF($E$1:$E1,$A$2:$A$10)=0)*($A$2:$A$10>""),0),COLUMN(A1)),"")}
Note that this formula only works, if you don't have duplicates in column A. Also blank cells (like B5 in your example) will be filled with a 0. You can remove those by using a IF formula:
{=IFERROR(IF(INDEX($A$2:$C$10,MATCH(1,(COUNTIF($E$1:$E1,$A$2:$A$10)=0)*($A$2:$A$10>""),0),COLUMN(A1))>0,INDEX($A$2:$C$10,MATCH(1,(COUNTIF($E$1:$E1,$A$2:$A$10)=0)*($A$2:$A$10>""),0),COLUMN(A1)),""),"")}
Copy into E2 and drag down and then right. Don't forget to enter with CTRL + SHIFT + ENTER

Obtain average based on multiple criteria from table column

I have a table that more or less looks like this:
Team_Name | Total_Errors | Total_Volume
_______________________________________
Sam | 3 | 1350
Sam | 5 | 1100
Jamie | 7 | 1600
Mark | 3 | 1220
Jamie | 10 | 2100
Mark | 5 | 1300
Sam | 5 | 1100
Jamie | 3 | 1900
Just with a lot more rows. I want to create a formula that calculates the average total_errors for just the numbers corresponsding to Team_names "Jamie" and "Sam".
How do I do this?
Something like Average(If(June(Team_Name)="Jamie","Sam"......?
(the table name is June)
thanks in advance
You can use Sum/Count:
=(SUMIF(A1:A8,"Jamie",B1:B8)+SUMIF(A1:A8,"Sam",B1:B8))/(COUNTIF(A1:A8,"Jamie")+COUNTIF(A1:A8,"Sam"))
I would go with a simple pivot table that uses June as a data source.
Put your Team_Name filed as a rows, and Total_Errors as Values. Change the Field settings of your Total_Errors to be an average, and change how many decimal points you want to see.
You can then apply whatever filters /Slicers you want and get your desired result.
Here's a screenshot (its on MAC, but you'll get the idea)
Assuming DATA in located at A1:C9 enter this formula at F5, note tat the Criteria Range used by the formula is locaed at E2:E4 (see picture below):
=DAVERAGE($A$1:$C$9,$B$1,$E$2:$E$4)

Creating pivot tables and tables with relationships

I am doing my final year dissertation research and I just gathered all the results from my questionnaire, from which I got 210 responses.
I am really struggling with Excel here, so I hope somebody can help me with this.
I am running Mac Office 2011. I have a single file which is so composed:
You are a... | You like... | Gender
participant 1 Carrot | blu, red | male
participant 2 Pear | blu | female
participant 3 Carrot | red | female
I was able to create a Pivot table of how "you are a...", like so:
Carrot | 2
Pear | 1
Total | 3
I was also able to convert this total in percentage, by right clicking in the cell and selecting
Field settings > options > Show data as > % of total.
(by the way, there is a way to add another column with percentages next to the original numbers)
Anyway, my issues are the following:
1) how can I see ho many carrots and pears replied to the gender? Something like
Male | Female | Total
Carrot 1 | 1 | 2
Pear 0 | 1 | 1
Total 1 | 2 | 3
2) Also, how many participants liked blue given that the field is single and contains all the values?
ps. all the data is already consistent as apart from a few fields, questions were multiple choice selection
Thank you very much for those who will help!

Resources