Merging Every Other Row Excel - excel

I have data in the below format where the first two columns are categories and the rest are data:
++++++++++++++++++++++++++
| AAA | xxxx | 4 | 5 | 6 |
++++++++++++++++++++++++++
| AAA | yyyy | 4 | 5 | 6 |
++++++++++++++++++++++++++
| BBB | xxxx | 2 | 3 | 9 |
++++++++++++++++++++++++++
| BBB | yyyy | 3 | 3 | 3 |
++++++++++++++++++++++++++
...
++++++++++++++++++++++++++
| NNN | xxxx | 7 | 4 | 4 |
++++++++++++++++++++++++++
| NNN | yyyy | 7 | 4 | 4 |
++++++++++++++++++++++++++
I want to merge each set of of cells of the first column to make the data appear neater. There will always be Two lines in a Set (Category and two subb categories:
++++++++++++++++++++++++++
| | xxxx | 4 | 5 | 6 |
| AAA |+++++++++++++++++++
| | yyyy | 4 | 5 | 6 |
++++++++++++++++++++++++++
++++++++++++++++++++++++++
| | xxxx | 4 | 5 | 6 |
| BBB |+++++++++++++++++++
| | yyyy | 4 | 5 | 6 |
++++++++++++++++++++++++++
...
++++++++++++++++++++++++++
| | xxxx | 4 | 5 | 6 |
| NNN |+++++++++++++++++++
| | yyyy | 4 | 5 | 6 |
++++++++++++++++++++++++++

Solved:
Merge Two Cells Manually
Highlight Merged Cell and [Home > Clipboard > Format Painter]
Drag over remaining cells in column to duplicate format option

Related

Auto Incrementing Number Values in Excel

I have to re-number over 30,000 rows in excel and am looking for a way to do this through an embedded excel function.
I have two columns, the original BuildingCount and the Test column. In the BuildingCount column, I have inconsistent count that needs to be consecutive 1,2,3 numbers in order to run a macros. However, the numbers are not always consecutive. I have been writing different variations of excel functions. The below is the output for =IF(A2>1),A2+1,1)
+----+---------------+------------+
| | A | B |
+----+---------------+------------+
| 1 | BuildingCount | TestColumn |
| 2 | 1 | #VALUE! |
| 3 | 2 | 1 |
| 4 | 3 | 3 |
| 5 | 5 | 4 |
| 6 | 6 | 6 |
| 7 | 9 | 7 |
| 8 | 1 | 10 |
| 9 | 2 | 1 |
| 10 | 3 | 3 |
| 11 | 4 | 4 |
| 12 | 5 | 5 |
+----+---------------+------------+
Ideally, the output would be the following:
+----+---------------+------------+
| | A | B |
+----+---------------+------------+
| 1 | BuildingCount | TestColumn |
| 2 | 1 | 1 |
| 3 | 2 | 2 |
| 4 | 3 | 3 |
| 5 | 5 | 4 |
| 6 | 6 | 5 |
| 7 | 7 | 6 |
| 8 | 1 | 1 |
| 9 | 2 | 2 |
| 10 | 3 | 3 |
| 11 | 4 | 4 |
| 12 | 5 | 5 |
+----+---------------+------------+
Any ideas would be very welcomed.
Formula in B2:
=IF(ROW()=2,1,IF(A2>A1,B1+1,1))
And dragged down

Show text as value Power Pivot using DAX formula

Is there a way by using a DAX measure to create the column which contain text values instead of the numeric sum/count that it will automatically give?
In the example below the first name will appear as a value (in the first table) instead of their name as in the second.
Data table:
+----+------------+------------+---------------+-------+-------+
| id | first_name | last_name | currency | Sales | Stock |
+----+------------+------------+---------------+-------+-------+
| 1 | Giovanna | Christon | Peso | 10 | 12 |
| 2 | Roderich | MacMorland | Peso | 8 | 10 |
| 3 | Bond | Arkcoll | Yuan Renminbi | 4 | 6 |
| 1 | Giovanna | Christon | Peso | 11 | 13 |
| 2 | Roderich | MacMorland | Peso | 9 | 11 |
| 3 | Bond | Arkcoll | Yuan Renminbi | 5 | 7 |
| 1 | Giovanna | Christon | Peso | 15 | 17 |
| 2 | Roderich | MacMorland | Peso | 10 | 12 |
| 3 | Bond | Arkcoll | Yuan Renminbi | 6 | 8 |
| 1 | Giovanna | Christon | Peso | 17 | 19 |
| 2 | Roderich | MacMorland | Peso | 11 | 13 |
| 3 | Bond | Arkcoll | Yuan Renminbi | 7 | 9 |
+----+------------+------------+---------------+-------+-------+
No DAX needed. You should put the first_name field on Rows and not on Values. Select Tabular View for the Report Layout. Like this:
After some search I found 4 ways.
measure 1 (will return blank if values differ):
=IF(COUNTROWS(VALUES(Table1[first_name])) > 1, BLANK(), VALUES(Table1[first_name]))
measure 2 (will return blank if values differ):
=CALCULATE(
VALUES(Table1[first_name]),
FILTER(Table1,
COUNTROWS(VALUES(Table1[first_name]))=1))
measure 3 (will show every single text value), thanks # Rory:
=CONCATENATEX(Table1,[first_name]," ")
For very large dataset this concatenate seems to work better:
=CALCULATE(CONCATENATEX(VALUES(Table1[first_name]),Table1[first_name]," "))
Results:

How to group results by intervals with condition

G-Green  A-Amber R-Red
If the value is less than 8 it should be Red between 8 and 9 it should be Amber and above 9 it's green.
Also I need to group the result, for eg : if  the Result is GAR (Green, Amber and Red) i need a value as "Not Good" and if the value is RAG(Red Amber and Green) it should be "Good" and if it is all Red it is "Poor"
How can I group the Red, Amber and Green?
+---------+---------+------+--------+-------+
| PROJECT | SUBTASK | TASK | PERIOD | VALUE |
+---------+---------+------+--------+-------+
| A | AA | AAA | 1 | 6 |
| A | AA | AAA | 2 | 8.2|
| A | AA | AAA | 3 | 10 |
| B | BB | BBB | 1 | 10 |
| B | BB | BBB | 2 | 9 |
| B | BB | BBB | 3 | 6 |
| C | CC | CCC | 1 | 7 |
| C | CC | CCC | 2 | 7 |
| C | CC | CCC | 3 | 6 |
+---------+---------+------+--------+-------+
Output
+---------+---------+------+---+---+---+
| PROJECT | SUBTASK | TASK | 1 | 2 | 3 |
+---------+---------+------+---+---+---+
| A | AA | AAA | R | A | G |
| B | BB | BBB | G | G | R |
| C | CC | CCC | R | R | R |
+---------+---------+------+---+---+---+
Final Output
+---------+---------+------+----------+
| PROJECT | SUBTASK | TASK | Result |
+---------+---------+------+----------+
| A | AA | AAA | Good |
| B | BB | BBB | Not Good |
| C | CC | CCC | Poor |
+---------+---------+------+----------+
Based on the edited sample data, the rule should be if it is >= 9 versus > 9. With that in mind here are the steps
Insert a calculated column and name it [CalcCol]
case
when [VALUE]<8 then "R"
when ([VALUE]>=8) and ([VALUE]<9) then "A"
when [VALUE]>=9 then "G"
end
Insert a calculated column and name it [Concat]
Substitute(Substitute(Concatenate([CalcCol]) over (Intersect([PROJECT],[SUBTASK],[TASK])),",","")," ","")
Insert a calculated column and name it [FinalOutput]
case
when [Concat]="RAG" then "Good"
when [Concat]="GGR" then "Not Good"
when [Concat]="RRR" then "Poor"
end
Now, you will see your results in a regular table view, or in a cross table view with Max([FinalOutput]) as the Cell values and the vertical axis set to Project, Subtask, Task in this order.

Excel - Return multiple matching values from a column matching two variables, horizontally in one row

I have this table:
| | A | B | C |
|---|---------|--------|---|
| 1 | | | |
| 2 | Oranges | Red | 1 |
| 3 | Apples | Yellow | 2 |
| 4 | Grapes | Orange | 3 |
| 5 | Oranges | Orange | 4 |
| 6 | Apples | Red | 5 |
| 7 | Grapes | Green | 6 |
| 8 | Apples | Green | 7 |
I want to check for matching values in Column A like Apples,Yellow , Apples,Green, etc... and return all the corresponding values from Column B in one row:
I tried to nest AND into IF but didn't work out as it wasn't returning any values at all.
| | A | B | C | D | E |
|----|---------|-------------|---|---|---|
| 11 | Apples | Green | 1 | | |
| 12 | Oranges | YellowGreen | 2 | | |
My code:
=INDEX($B$2:$B$8, SMALL(IF($A$11=$A$2:$A$8, ROW($A$2:$A$8)-ROW($A$2)+1), COLUMN(A1)))
How do I get this formula to look at two variables to match?
Thank you.
You seem to be using an array formula, wouldn't concatenating work?
{=INDEX($C$2:$C$8, SMALL(IF($A11&" "&$B11=$A$2:$A$8&" "&$B$2:$B$8, ROW($A$2:$A$8)-ROW($A$2)+1), COLUMN(A1)))}

Insert Cell data in one row ( from A1 to An )

i have been try to solved this using tutorial from google ( everywhere ) but i'm not find any answer, i hope i can found the answer here.
here is my data
A B C
+-------+----+-----+
1 | 123 | 4 | 5 |
2 | 678 | 9 | 10 |
+-------+----+-----+
the result that i need :
A B C
+-------+----+-----+
1 | 123 | | |
2 | 678 | | |
3 | 4 | | |
4 | 5 | | |
5 | 9 | | |
6 | 10 | | |
+-------+----+-----+
or in other order like :
123
4
5
678
...
any one know how to solved this ?

Resources