Excel Data convert from single row to multiple row - excel-formula

I have data in excel in following manner.
Colname Count
A 5
B 3
C 4
I want to convert it into this way.
A 1
A 2
A 3
A 4
A 5
B 1
B 2
B 3
C 1
C 2
C 3
C 4
Based on the count i want that data must be converted into rows with increasing order. Please let me know the feasiblity .

=IF(ROW()<B$1+1,"A",IF(AND(ROW()>B$1,ROW()<SUM(B$1:B$2)+1),"B",IF(AND(ROW()>SUM(B$1:B$2),ROW()<SUM(B$1:B$3)+1),"C",""))) in F1 and fill down. In G1, this formula =IF(COUNTA(F1)>0,COUNTIF(F$1:F1,F1),"") and fill down. Letters are in Column A and numbers in Column B. I chose these columns randomly to work a solution. Change to match your actual data, if needed.

Related

How to count unique values w.r.t one column in excel?

I am trying to find the number of unique values in column B("Levels") for each value in column A("Heads").
For example for Heads "A" we have 3 unique values ("ALPHA", "BETA", "ECHO") and it should return in column "Expected Count".
Heads Levels Expected Count
A ALPHA 3
A ALPHA 3
A BETA 3
A ECHO 3
B CHARLIE 2
B CHARLIE 2
B DELTA 2
C ALPHA 4
C BETA 4
C CHARLIE 4
C DELTA 4
I need to execute the functionality for 1000's of rows. Is there any formula?
you need one new column. insert it between B and C. concatenate column a and b with formula
=a&b
then do a simple formula in column d and drag that down on your 1000's of rows
=countifs(C:C,C2)

Rank like Subtotals

It's possible use Rank like Subtotals, that only use de showing data?.
If I filter data by a column, I want than Rank function only use these datas
Example
A B C The column C its Rank of column B
a 5 3
b 9 1
a 2 4
c 7 2
Now if I apply a filter in column A for value 'a'
A B C I want the rank recalculate with this new data
a 5 1 --> column C change from value 3 to value 1
a 2 2 --> column C change from value 4 to value 2
Thanks
You cannot do it by using RANK() formula, but you can create customizable rank formula. For this, You should add column at the and of table to indicate the row visibility, and put this formula into this column:
=(AGGREGATE(3;5;B2)>0)+0
Then put this formula into column C:
=SUMPRODUCT(($B$2:$B$9<B2)*($E$2:$E$9=1))+1
To check real example, download my sample file

A function that will lookup a reference

Before I get started thanks for taking your time and helping.
This is what my worksheet looks like:
Row # B C D E F
2 1 Product 1 B2 B3 B4
3 2
4 6
5 1 Product 2 B5 B6
6 5
7 4 Product 3 B7
I was trying to follow this formula: (The best answer one or green check mark) return values from multiple matching rows
I got all the way to the =IFERROR(INDIRECT(lookups!H5),"") but can not get this to work.
What I am tying to do is order the numbers in Column B to go to the right of the product. Which I was able to get the column it is in (B) and the row number it is in (B2). I would like to change the value (B2) to the number that is there.
I would like it to look like this:
Row # C D E F
2 Product 1 1 2 6
3
4
5 Product 2 1 5
6
7 Product 3 4
If someone could help explain this to me or find a better way that would be great.
Not sure what is to happen to columnB but if you replace B with "="B throughout columns D:F then select each of these in turn and apply Text to Columns with Tab as the delimiter the 'cell references' convert to formulae referring to the values in B. If you want to delete columnB copy D:F and Paste Special, Values over the top.

Transpose colums to rows for each unique value in Excel

I have data in a spreadsheet that looks like this:
A 1
A 2
A 3
B 1
B 2
B 3
B 4
C 1
C 2
I want it to be like this:
A 1 2 3 *
B 1 2 3 4
C 1 2 * *
where each letter or number is in a seperate cell. The * indicates an empty cell.
I've started copying and pasting and checking 'transpose' in the paste special dialogue but had to give up because the spreadsheet is just too large to do it manually. I've been looking at this but it doesn't exactly fit my needs. Any suggestions?
Have you tried a PivotTable with labels (say Letter and Number) where Letter is in Row Labels, Number is in Column Labels and Sum of Number for Σ Values?

EXCEL match 2 columns against each other

I have two columns of data, they look something like this:
A B C D
1 2 SOME RECORD
2 6 SOME RECORD
3 10 SOME RECORD
4
5
6
7
8
9
10
So basically column A is a list of indices, where some of them appear in column C with corresponding records saved in column D. Column B is currently empty, and what I want to do is if say index 2 appears in both column A and column C (they matches), then put the record beside C2 in the cell B2. So essentially I want it to look like this:
A B C D
1 2 SOME RECORD
2 SOME RECORD 6 SOME RECORD
3 10 SOME RECORD
4
5
6 SOME RECORD
7
8
9
10 SOME RECORD
Can someone help please?!! Thanks!!!
UPDATE: I tried this and it doesn't work. The data in column D is calculated using a UDF and is refreshing every 1 second. The VLOOKUP function fails even though I can see the 2 indices are the same!! Is it because of the format of the cell or column? I.e. does vlookup compare data type as well?
Assuming your data in A starts from A1 - put in B1 the following and autofill:
=IFERROR(VLOOKUP($A1,$C:$D,2,0),"")
This includes handling of missing values.
You'll want this:
B1=VLOOKUP(A1, C:D, 2, FALSE)
This will look up the value in column A within the array spanning columns C and D. It will give you the value found in the second column (D). FALSE makes it an exact match, otherwise you might get 2 and 20 matching because hey, they're kind of similar...

Resources