Excel Combining Multiple Rows - excel

I feel like I am missing something simple I would like to do with Excel but I am asking the question incorrectly on Google...here it goes.
I'm taking a look at some Excel sheets for a friend who runs a race timing company. At the end of a race he has an excel sheet with the following format for a series of races
Name | Gender | Age | Race 1 | Race 2 | Race 3
Bob | M | 20 | 1 | |
Al | M | 24 | 2 | |
Bob | M | 20 | | 2 |
Al | M | 24 | | 1 |
::Assume we don't care about time right now, just place::
I would like to do "something" (again I'm not sure what the proper term is, merge in Excel actually merges two adjecent cells together), where I can get the final output such that
Name | Gender | Age | Race 1 | Race 2 | Race 3
Bob | M | 20 | 1 | 2 |
Al | M | 24 | 2 | 1 |
I'm not sure how to collapse the data for the like rows together.
I'm not opposed to writing a little VBA, but I am thinking this is a built in Excel function but I'm not sure what it is called or how to make it "dance".
Thanks!

PivotTable.

The data format is making life a bit more difficult than it needs to be. Rather than having individual columns for race #1, race #2, race #3 etc, it would make life easier to have a column called "Race Number" and arrange the data like this:
Name | Gender | Age | Race Number | Place
Bob | M | 20 | 1 | 1
Al | M | 24 | 1 | 2
Bob | M | 20 | 2 | 2
Al | M | 24 | 2 | 1
This would make things like PivotTable (as suggested by Jason) a lot easier to work with

Related

Divide two "Calculated Values" within Spofire Graphical Table

I have a spotfire question. Is it possible to divide two "calculated value" columns in a "graphical table".
I have a Count([Type]) calculated value. I then limit the data within the second calculated value to arrive at a different number of Count[Type].
I would like to divide the two in a third calculated value column.
ie.
Calculated value column 1:
Count([Type]) = 100 (NOT LIMITED)
Calculated value column 2:
Count([Type]) = 50 (Limited to [Type]="Good")
Now I would like to say 50/100 = 0.5 in the third calculated value column.
If it is possible to do this all within one calculated column value that is even better. Graphical Tables do not let you have if statements in the custom expression, the only way is to limit data. So I am struggling, any help is appreciated.
Graphical tables do allow IF() in custom expressions. In order to accomplish this you are going to have to move your logic away from the Limit Data Using Expressions and into your expression directly. Here should be your three Axes expressions:
Count([Type])
Count(If([Type]="Good",[Type]))
Count(If([Type]="Good",[Type])) / Count([Type])
Data Set
+----+------+
| ID | Type |
+----+------+
| 1 | Good |
| 1 | Good |
| 1 | Good |
| 1 | Good |
| 1 | Good |
| 1 | Bad |
| 1 | Bad |
| 1 | Bad |
| 1 | Bad |
| 2 | Good |
| 2 | Good |
| 2 | Good |
| 2 | Good |
| 2 | Bad |
| 2 | Bad |
| 2 | Bad |
| 2 | Bad |
+----+------+
Results

Excel 2010 Calculating Production line quantities without long calculations

Program: Excel 2010
Requirements: Prefer no VBA (Macro free book)
I am creating a spreadsheet to calculate items required for components (parts). I have a list of the product, and under the number of specific parts. I have a calculation which tells me what the total parts are needed, but, is there a better way?
=($C$32*C34)+($D$32*D34)+($E$32*E34)+($F$32*F34)+($G$32*G34)+($H$32*H34)+($I$32*I34)+($J$32*J34)+($K$32*K34)
| A | B | C | D | E | F |
| Making: | | 2 | 2 | 2 | |
|---------------|-------|------------|-------------|-----------------|---------|
| Item -> | Total | Small raft | Rowing boat | Sm sailing boat | Corbita |
| | | | | | |
| Planks | 20 | 4 | 6 | | |
| Logs | 8 | 4 | | | |
| Nails - Large | 16 | 8 | | | |
| Oars | | | | | |
In the above, you can see that ($C$32*C34) = 8 & ($D$32*D34) = 12 => 12+8 = 20 (B34) (Planks Total)
Is there an easier way of doing this, or will my equation just keep getting bigger?
Thanks in advance.
As chris neilsen mentioned in his comment, you can use the SUMPRODUCT function in Excel. The formula in your cell B34 (total planks) should look like this:
=SUMPRODUCT(C32:K32,C34:K34)
This has the effect of multiplying the corresponding components in the given ranges (C32 * C34, D32 * D34, etc.) and then returning the sum of those products/multiplications.
As you add more columns, you can expand K to the last column in the range that you want to add up in both ranges.

Can I populate a column with conditional data while omitting empty rows or possibly autosort?

In one spreadsheet document, file.xlsx, I have 2 sheets. Sheet1 has the editable fields. Sheet 2's sole purpose is to read the data from Sheet1.
The point is to keep track of inventory and easily display items needed to be ordered.
Sheet1 'column a' is item number for ordering
Sheet1 'column b' is the number I have on hand
Sheet1 'column c' is the formula cell to find the number needed to be ordered
It looks something like this:
Document1:sheet1
A | B | C |
1 |txt1 | 1 | =10-b1 |
2 |txt2 | 0 | =10-b2 |
3 |txt3 | 13 | =10-b3 |
4 |txt4 | 5 | =10-b3 |
5 |txt5 | 2 | =10-b4 |
There is some if statement conditional formatting in the "C" column to check if the "B" column has a value HIGHER than 10 and if it hits true then the corresponding C cell is blank but for space, i'm summarizing here
Document1:sheet2
A | B |
1 |=if(sheet1!C1>0,Sheet1!A1,"") |=if(sheet1!C1>0,Sheet1!C1,"") |
2 |=if(sheet1!C2>0,Sheet1!A2,"") |=if(sheet1!C1>0,Sheet1!C2,"") |
3 |=if(sheet1!C3>0,Sheet1!A3,"") |=if(sheet1!C1>0,Sheet1!C3,"") |
4 |=if(sheet1!C4>0,Sheet1!A4,"") |=if(sheet1!C1>0,Sheet1!C4,"") |
5 |=if(sheet1!C5>0,Sheet1!A5,"") |=if(sheet1!C1>0,Sheet1!C5,"") |
If an item isn't to be ordered because stock is high, it doesn't show up in the list. This is ok. It looks like this:
Document1:sheet2
A | B |
1 | txt1 | 9 |
2 | txt2 | 10 |
3 | | |
4 | txt4 | 9 |
5 | | |
What I would like to see is:
Document1:sheet2
A | B |
1 | txt1 | 9 |
2 | txt2 | 10 |
3 | txt4 | 9 |
4 | | |
5 | | |
For 5 Items in the example, it doesn't seem that annoying, but in actuality I have 1200 potential rows and it varies between 200 to 800 actually populated each time i conduct inventory. The whole point is to have one continuous section of rows that I can select and print. Maybe some way of autosorting and placing the empty ones on the bottom?
I've taught myself excel. I don't know the advanced tricks and things.
I'm a typically a programmer but I've been tasked with this project and the guys upstairs want me to do it in excel.
i've overcomplicated this, to the max.
a simple sort putting the empty's at the bottom is the resolution.
not quite as automated as i'd like
but
it works.

How to find the match between text that typo in Excel?

I have two columns of data with an hundred names on and I need to find the matches.
The problem is when names on the second column are not exactly the same as the first column. Its hard to match them with a hundred names.
Is there any formula in excel for at least give tolerance with the data like "Setyadi" with "Setiadi", or "Tak Jelan" with "Tak Lejan".
Thanks for the solution, it works, I edited this because I want to ask more,
I have another problem, could you help me again?
I have a data like this, I want to fill column C with a number according to match the name in column D with column A. The other problem is, I want to match the name that only in a group that mentioned in column E, even not in the same row.
From
A | B | c | D | E |
Setyadi | 1 | | Setiadi | 11 |
Tak Jelan | 2 | | Tak Lejan | 11 |
Gordon | 3 | | Herik | 12 |
Alex | 4 | | Goerdon | 12 |
Heri | 5 | | Alex | 12 |
Into
A | B | c | D | E |
Setyadi | 1 | 1 | Setiadi | 11 |
Tak Jelan | 2 | 2 | Tak Lejan | 11 |
Gordon | 3 | 5 | Herik | 12 |
Alex | 4 | 3 | Goerdon | 12 |
Heri | 5 | 4 | Alex | 12 |
What I need is, how can we compare the name in group that mentioned in column D, then We can automatically give the number in column C that coupling from column B.
Thanks in advance
You can use something like John Walkenbach's SOUNDEX() function:
http://spreadsheetpage.com/index.php/tip/searching_using_soundex_codes/
Then put the code in Excel:
http://www.contextures.com/xlvba01.html
Now, if you had this data:
A | B
Setyadi | Setiadi
Tak Jelan | Tak Lejan
Now you want to add a formula in C1 like:
=SOUNDEX(A1)
And copy that formula to C2, D1, and D2.
Now take a look at your data:
A | B | SOUNDEX(ColumnA) | SOUNDEX(ColumnB)
Setyadi | Setiadi | S330 | S330
Tak Jelan | Tak Lejan | T245 | T242
Notice how Setyadi and Setiadi are exactly the same, that's because they sound the same, which is why the code from the SOUNDEX function comes back like this.
Now when you look at the Tak Jelan entry, you see that there is a difference of 3 (from T245 to T242). Now, what I would do is creat a new formula where if the first letter is the same, then pull out only the number and compare how close they are like:
=IF(LEFT(C1,1)=LEFT(D1,1),STDEV.P(MID(C1,2,3),MID(D1,2,3)))
Then you can compare the std deviation.

SAS proc transpose and output to excel

Another SAS question from me (I noticed these don't come up here that often...):
I have a data set containing something like this:
Name | Category | Level | Score
John | cat1 | 1 | 80
John | cat1 | 2 | 70
John | cat1 | 3 | 10
John | cat2 | 1 | 60
John | cat2 | 2 | 95
John | cat2 | 3 | 43
John | cat2 | 4 | 28
And the output (excel format) should look like:
| cat1 | cat2 |
name | 1 | 2 | 3 | 1 | 2 | 3 | 4 |
John | 80 | 70 |10 |60 |95 |43 |28 |
What I do now, is using proc transpose to get the data in the right order and then proc exportto go to .xls.
This works fine, except for one thing. I cant get the second layer of subdivision to work. So right now, before my proc transpose I actually concat my category and level in my dataset (eg making it '1_cat1') and then transpose on this value, giving me the following output:
name | 1_cat1 | 2_cat1 | 3_cat1 | 1_cat2 | 2_cat2 | 3_cat2 | 4_cat2 |
John | 80 | 70 | 10 | 60 | 95 | 43 | 28 |
Is there any way to get the first, desired output ?
Assuming that you're familiar with your ODS options to get it into Excel (I'm just lazily using html and saving it as .xls, but you could use tagsets etc. instead), here is a PROC REPORT solution to display the data in the format you're looking for. Check out the use of across variables in proc report. There's probably a way to suppress the column that isn't used under cat1 in the output, but I can't recall it right now.
data testData;
infile datalines dsd delimiter='|';
input name $ category $ level score;
datalines;
John | cat1 | 1 | 80
John | cat1 | 2 | 70
John | cat1 | 3 | 10
John | cat2 | 1 | 60
John | cat2 | 2 | 95
John | cat2 | 3 | 43
John | cat2 | 4 | 28
;
run;
ods html file="C:\SomePath\MyFile.xls";
proc report
data=testData;
columns name category,level,score;
define name / group;
define category / across '';
define level / across '';
define score / sum '';
run;
ods html close;
I don't think you will be able to go directly to your desired output using proc transpose since you are looking to get each category to span multiple levels. You might want to research two other procedures, REPORT and TABULATE. I believe you can do this directly from either one, but it has been years since I used these. A third option is to create an XML file with ODS in which you can control pretty much exactly how you want to output to appear, though it takes a little more effort to learn how to do this.

Resources