Sort a column in excel - excel

My column values looks like this.
Q1-2011 (1st quarter 2011 )
Q1-2011
Q1-2012
Q2-2011
.
.
.
I want to sort this column by having all the the quarters of year 2011 then 2012 and so on and so forth. However when I try to do the normal sort it gives the Q1 of all the years then Q2..till Q4. Please help me sort the column year wise.
Thank you

So you have a column with text "Q1-2011" Here's how to do the sort.
Open up the spreadsheet.
Do you see the column with the "Q1-2011" in it? (I'm going to call this column A) Select the column header to the right of it. Right Click, insert. Do this again, Right Click, insert. This step creates two empty columns to the right of your original "Q1-2011".
Copy the entire column "Q1-2011" to the left most of the two columns you just created. (that would be column B. At this point column C is blank)
Select the column you just filled with the copied data, with a left mouse click. The selected area should be highlighted in blue.
On top menu in Excel, choose the Data tab, then choose Text to columns
You should see a pop up box. Select Delimited --> Next. Select Other and in the box add - the minus sign --> Next, and finished.
Now sort your data. Select the entire sheet. (left click, area to be sorted will be in blue.) Choose Data Tab then select Sort. You will see a popup box. Sort by column C (the year) first, then add a level (see the button?) than sort by column B (the quarter)
Now hide columns B and C .
All done!

I believe you'd have to create another column to bring back a date in the quarter and then filter on that.

Related

Excel, deleting columns with Zero value and graphing 1000's of points

I have a spreadsheet with 1000's points that I want to graph.
Y axis are dates, X axis is time, values are electricity consumption in Kwh.
As you can see updates are in 15min intervals but every other is 0.
a) I want to delete the 0 columns.
b) And graph the result > 255points
excel.jpg
To delete every other column without doing it manually, you can create a formula to help. First insert a row at the top of the sheet (you will delete this row when you are done with it.) Next, in your new helper row, add a MOD function to the first column with the Kwh values (probably column B.) This returns a remainder after we make a division, so we pass the column function to it as our number parameter. The other parameter is the divisor so we will use 2 for that.
=MOD(COLUMN(),2)
With the cell selected, click the bottom right square of the green highlight of that cell (when your cursor turns to a +) and drag it across all of your columns. Now we will have a 0 and 1 in every other column.
We want to convert that formula to values to make sure nothing happens to our data so now copy the highlighted cells and right click to paste special. Here you will change the Paste radio button to Values.
Now we have values in the helper row so we can select all of our columns except the date row, so do that and open the data column. Click the Sort icon and in the sort window now you will click options and choose from left to right. We will then choose to sort by row 1, and choose the order to be smallest to largest.
Now when you click to sort you will have all of your columns with 0 in them (if it was indeed every other column) on the right-hand side, and all of your data is in the left. Easily select all of the zero rows now and delete them manually with one click. Also delete the helper row you created and you have the sheet ready to graph.
Select all of your data including column A and Row 1, and then go to the insert tab. In charts you can see the different types of graphs. Check the recommended charts or experiment by clicking on the different types of graphs to see which one fits your needs the best. If you choose the 2 Line or Scatter for instance, it will graph out each day in different colors showing Kwh on the Y axis, and X will be the time. You can then format as you wish.

Need help combining and adding strings in Excel

I have a list of items in one column and a total number in another column. I need to combine every instance an item appears in column A and the amounts in column B. I also need it to sort by highest number first on its own if possible. Here is an example of what I mean.
Column A & B is my list, Column D & E is what I want the results to look like:
Can anyone help out? I've racked my brains for days and cant seem to get it to work. Thanks.
This is what pivot tables do...
Create a pivot table Image below.
place cursor in D2
Menu - Insert
Tables - Pivot table
Select range of data
fill out fields on right as in image. (I had A on line 2 = 3 so my total said 14 and didn't refresh before I took the screen capture)
right click on a value in the sum of total column and click sort from popup and select largest to smallest.

Rotate Excel table on ID field make columns repeat as rows for each ID

I am attempting to do what is described in This Stack Exchange page but instead of doing it in SQL I want to do it in Excel. I have date in a Horizontal table that I want to rotate along the ID column and take the column names as Attribute Name rows with their IDxAttribName reference showing in the Attribute Value field of the final product. The images below show an example of what I have now and what I want. I just need a point in the right direction with a formula or example vba. Any help is appreciated.
Before:
After:
This is for Excel 2016, so if you have a different version, you may need to adapt slightly (it seems like the menu items changes, but this functionality is probably in most recent versions).
1. Select the data you want to transform.
2. Go to the Data tab, click From table.
3. The Query Editor opens.
4. Select the 'Polarity', 'Diameter Inches', and 'Diameter Millimeters' columns.
5. Click on the Transform tab, click on Unpivot Columns.
6. Go back to the Home tab, click Close & Load.
It puts the results in a new tab.
Say the original is in cols A, B, and C.
In F2 enter:
=INDEX(A:A,1+ROUNDUP(ROWS($1:1)/2,0))
and copy down. In G2 enter:
=IF(ISODD(ROWS($1:1)),"inch","milli")
and copy down. In H2 enter:
=OFFSET($C$2,ROUNDUP(ROWS($1:1)/2,0)-1,MOD(ROWS($1:1)-1,2))
and copy down:
What is going on:
Column F just duplicates column A, but doubles the entries (Snafu is doubled).Column G is a flip-flopColumn H maps columns B&C into a single column.
Using relatively simple formulas you can:
map a table into a single row or a single column
map a single row or column into a table
reorganize a table

Pivottable in Excel. How can I order value in a column in progressive more

I have a Pivot table in Excel with a column representing the week number.
If I do sort in Alphabetical order I will get 1, 10, 11, 12 ... 2, 20, 21 etc.
This is not making sense. How can I get a 1,2,3,4... order?
I was looking into creating a "custom filter" with no success.
Any help?
Thanks
Make sure your source data column is formatted as General:
Go to source data
Right-click on column
Select Format Cells
Select General
Click OK
If you get green arrows in the upper left corner of each cell, then convert the text to numbers:
Click on the first cell
Drag the mouse down to the last cell (it won't work if you use keyboard shortcuts like shift+ctrl+down)
Click the yellow diamond icon
Select "Convert to Number"
After you have accomplished the above, refresh your pivot table and sort the field.

Copy few rows from a Big list and all the columns should be Followed

I have a Challenge I have 12 Months Bank statement and I have to select and Bifurcate the expenses.
There are many filters suppose I select rows by the filter "PURCHASE SUBJECT: MCUPOS" There comes 79 Rows when I do CTRL+A all rows in that Particular columns are selected, But what I want is that all columns in these rows should be also selected before i copy.
How to do that?
This Video will help to understand-
http://screencast.com/t/uR9zDuB0dwI
How about Ctrl+Shift+[Right Arrow] and then Ctrl+Shift+[Up or Down Arrow]? ...Hold all these keys when selecting, and then let up off the arrow keys when your highlighted area reaches the size you want.
This will let you highlight from one side of a sheet to another, and then you can essentially tell Excel to continue highlighting up/down the selected range.
Hope this helps!
Or if you just want to select every single row in a particulat column, you can click on the very top of the column, where the Columns are denoted with letters, A, B, C, etc... and click the mouse once your pointer turns into a down arrow. This will highlight all the rows of a particular column. From there you can right click to copy, or use Ctrl+C.

Categories

Resources