Excel sort numbers with letter prefix - excel

I have a column:
a1
a10
a11
a12
a13
a14
a15
a16
a17
a18
a19
a2
a20
a21
a22
a23
a24
a25
a26
a27
a28
a29
a3
a30
a31
a4
a5
a6
a7
a8
a9
But I need to sort it like this:
a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 a11 a12 a13....
Does anyone know how to do it?

Assuming your data is in column A, put this formula in column B (or wherever is handy) and sort by it:
=LEFT(A1,1) & TEXT(SUBSTITUTE(A1,LEFT(A1,1),""),"00")
This assumes that you have one character in each cell in column A, followed by a number.

I'm not aware of an option that allows you to sort the way you like - however, you could help yourself with a a helper column that extracts the number - and then sort both columns by this column (and delete the helper column afterwards if you wish.
Assuming your text would always be a, you could extract the number with this formula: =VALUE(RIGHT(A1,LEN(A1)-1)).
In case you have different strings, use this formula:
=1*MID(A2,MATCH(TRUE,ISNUMBER(1*MID(A2,ROW($1:$9),1)),0),COUNT(1*MID(A2,ROW($1:$9),1)))
You need to enter it as an array formula, i.e. instead of pressing Enter, press Ctrl-Shift-Enter.
Credits for the latter formula go here.

Copy your column somewhere with a spare column to its immediate right, split that added column Fixed width at the first character with Text to Columns and use the numbers-only column for sorting.

Related

Excel formula with diagonal

I have a question for executing quickly.
A1:C3 is original. I want to create a new based on it and F1:F3.
A8 is A3 / F1.
A7 is A2 / F2.
A6 is A1 / F3.
B7 is B2 / F1.
B6 is B1 / F2.
C6 is C1 / F1.
I want to use formula to do this rather than input A8 = A3/F1. And do it many times in each cells.
How can I do?
This formula should do it:
=IF(A1<>"",A1/INDEX($F$1:$F$3,1+(ROW()-ROW($A$6)+COLUMN()-COLUMN($A$6))),"")
You have to put it in A6 and copy it to the other cells.
(#Rob Gale: ok :-) )
First you have to check for empty cells (A1<>"").
Then the numerator of the division is simply a reference and can easily copied between the formulas (A1).
The tricky one is the nominator. The sum of the row and column offsets of the respective cell is calculated and used as index into the 'percentage range' in column F.
Select A6:C8
Press F2
Copy and paste this formula
=CHOOSE({1,2,3;4,5,6;7,8,9},A1,B1,C1,A2,B2,C2,A3,B3,C3)/CHOOSE({3,2,1;2,1,1;1,1,1},F1,F2,F3,F1,F2,F3,F1,F2,F3)
Press Ctrl+Shift+Enter

Concatenate and fill but not continuously

I have an excel sheet that I need to concatenate a couple of cells and then add a number. I want something like:
A1
A2
A3
A4
B1
B2
B3
A5
But instead, I get:
A1
A2
A3
A4
B5
B6
B7
A8
Is there a way to achieve what I want?
Thank you
Does this work for you? Added a helper column.

Split one column by rows to multiple columns in Excel

I am working in Excel 2013, and I have data like the following:
A1
A2
A3
B1
B2
B3
(The As go to A13, Bs go to B13, Cs go to C13, and so on until you get to row 2495.)
How do I divide this long column where the 14th row moves to the next column? See below:
A1 B1 C1 ...and so on
A2 B2 C2
A3 B3 C3
...
A13 B13 C13
B1: =INDEX($A:$A,(COLUMNS($A:A)-1)*13+ROWS($1:1))
Fill right to AA1
Select B1:AA1 and fill down to row 13
The above assumes you are going A-Z. But you must have other characters also in order to get to 2495 rows. Your real data may require some tweaks from what I have presented -- either filling down further; or filling further to the right, or using a different constant then 13
If you want to parse the data into three separate columns then in B1 enter:
=A1
In C1 enter:
=A14
In D1 enter:
=A27
Then copy these three cells downwards:

excel fix column value, vary row value, non contiguous row

I have a list of 5 columns (A-E) and multiple rows (2-89), and need to derive select rows (e.g. 1, 4, 6, 8, 10, 11, 14, 21) from the list with only two of the columns I am interested in (e.g. col A and C).
I have picked out all the values of column A (since my data set is irregular, and i can't figure out a way to automate this), is there a way to copy just the row value, but change the column value to "C" in the other cell?
I have:
A1
A4
A6
A8
A10
A11
A14
A21
So I want effectively:
A1 C1
A4 C4
A6 C6
A8 C8
A10 C10
A11 C10
A14 C14
A21 C21
Thanks in advance, and sorry if this question is really trivial! I can't seem to find the right answers googling.
You can use this :
=SUBSTITUTE(A1;"A";"C")

excel fill series restart from 1 after new value

I have the following in one column, it keeps going down with random letters but always end with 1.
a1
a1
b1
b1
b1
b1
b1
c1
c1
c1
how can i make it fill series but start again from one when ever a new letter.
It should look like this:
a1
a2
b1
b2
b3
b4
b5
c1
c2
c3
You can genereate a new series in the column beside it. Lets assume your data starts in A1. In put 1 in B1 and in B2 place the following:
=IF(left(A1,len(A1)-1)=left(A2,len(A2)-1),B1+1,1)
Copy B2 down.
When you are done, you can copy your information from column B and paste is a values if you do not want the numbers changing again.

Resources