I've got a list of customers where the customers are repeated across multiple rows. I'd like to merge cells that are similar in Column A, but not touch anything else. If I could even format bold borders between customers, that'd be great.
Basically,
1 | abc | abc
1 | abc | def
1 | def | xyz
2 | abc |
2 | abc | def
3 | | xyz
4 | abc | qrs
4 | abc | def
5 | mni | xyz
To
1 | abc | abc
| abc | def
| def | xyz
2 | abc |
| abc | def
3 | | xyz
4 | abc | qrs
| abc | def
5 | mni | xyz
You don't have to merge cells. In fact, I recommend against it, that causes more problems than it solves. What you could do is hide column "A", then insert an empty column "B" put this formula in "B2", then auto-fill:
=IF(A2=A1,"",A2)
Also, this solution avoids macros, which can be difficult and problematic if you are new to them.
For that "customer separator" formatting that you're looking for, use conditional formatting. Here's a picture:
I got that tip from this web site: Conditional Formatting
Related
I'm not sure what to search for this.
Basically, say I have a sheet that looks like this:
A | apple | 1
A | aardvark | 1
A | alternate | 3
B | bear | 2
B | banana | 4
C | candy | 3
C | carnivore | 2
and I want to copy values into another sheet so that it looks like this:
A | apple | 1 | aardvark | 1 | alternate | 3
B | bear | 2 | banana | 4 | |
C | candy | 3 | carnivore | 2 | |
I know there's the lookup function, but I'm not sure how to make it select the first, second, third etc. instance of what's being referenced.
Thanks in advance for any help.
For the screenshot below, use the following formulas:
E2: =IFERROR(INDEX($A$1:$A$8,MATCH(E1,$A$1:$A$8,0)+COUNTIF($A$1:$A$8,E1)),"")
F2:
=IF(INT(COLUMNS($F$1:F$1)/2)<COUNTIF($A$2:$A$8,$E2),INDEX($B$2:$B$8,MATCH($E2,$A$2:$A$8,0)+INT(COLUMNS($F$1:F$1)/2)),"")
G2:
=IF(INT(COLUMNS($G$1:G$1)/2)<COUNTIF($A$2:$A$8,$E2),INDEX($C$2:$C$8,MATCH($E2,$A$2:$A$8,0)+INT(COLUMNS($G$1:G$1)/2)),"")
Select F2 and G2, and fill to the right as far as you need, then fill the entire table down as far as you need.
I have this Excel file.
The layout is like this:
[Sheet1]
No | Alphabet | Fruit
1 | ABC |
2 | DEF |
3 | GHI |
[Sheet2]
Alphabet | Fruit
ABC | apple
ABC | pear
DEF | vegetable
I'd like to fill in the 'Fruit' column(s) in Sheet1.
What I currently have is this (which I put in C2 and drag down):
=INDEX(list!$A:$B,MATCH($B2,list!$A:$A,0),2)
Unfortunately, this only gives me the first match for each alphabet, like this:
[Sheet1]
No | Alphabet | Fruit
1 | ABC | apple
2 | DEF | vegetable
3 | GHI | #N/A
What I want to do is (in Sheet1) to return all matches under Fruit and replace 'vegetable' and '#N/A' to 'NIL', like this:
[Sheet1]
No | Alphabet | Fruit
1 | ABC | apple | pear
2 | DEF | NIL
3 | GHI | NIL
The following array formula will do somewhat what you want:
=IFERROR(INDEX(Sheet2!$B$2:$B$4,MATCH(1,(Sheet2!$B$2:$B$4<>"Vegetable")*(Sheet2!$A$2:$A$4=$A1)*(COUNTIFS($A1:A1,Sheet2!$B$2:$B$4)=0),0)),"")
It will return a null string instead of NIL
Being an array formula it needs to be confirmed with Ctrl-Shift-Enter instead of enter when Exiting edit mode. If done correctly then Excel will put {} around the formula.
The reason I went with "" instead of "NIL" is that this formula is designed to be drug/copied across and down. It would fill every cell with NIL where the formula is not a fruit.
I have an Excel table as follows:
Color | Inventory
Blue | 180
Red | 50
Green | 10
I want to look up the inventory of the color that I would require depending which product I'm going to use and then subtract if it was used on a past line, my table would look like this:
Item | Color | Usage | Inventory Left
ABC | Blue | 50 | 130
BCD | Blue | 30 | 100
CDE | Blue | 50 | 50
EFG | Red | 25 | 25
FGH | Red | 10 | 15
GHI | Green | 5 | 5
How could I do it with an Excel formula?
I was thinking in some type of SUMIF with OFFSET but I can't figure it out.
With a layout as shown, please try:
=VLOOKUP(B9,$A$1:$B$6,2,0)-SUMIF(B$1:B9,B9,C$1:C9)
The principle would be the same but a different layout might be more convenient.
I need another transformation help in Excel
| A | B |
---| ----|--------|
1 | ID | Course |
2 | 1 | A1 |
3 | 1 | A2 |
4 | 2 | A1 |
5 | 3 | A2 |
I want to have a kind of group by, i.e.
| A | B | C |D | ...
---| ----|---------|---------|---------|----
1 | ID | Course1 | Course2 | Course3 | ...
2 | 1 | A1 | A2 | | ...
3 | 2 | A1 | | | ...
4 | 3 | A2 | | | ...
Any ideas? Is it possible without VBA macro?
I believe that the following link on removing duplicates from column would suit your needs (in your case you would do it horizontally).
http://www.get-digital-help.com/2009/03/30/how-to-extract-a-unique-list-and-the-duplicates-in-excel-from-one-column/
Per your reply to Robert, if you want to do it without VBA, try this... Select all cells in the first column. Copy and paste them into the first column of another worksheet. Use Excel's Remove Duplicates function on the pasted data. Then use INDEX functions in the columns to the right in order to pull the first, second, etc values matching that first column value.
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.