How to consolidate rows in excel in this scenario - excel

I have two Columns. Column A has Part Numbers, Column B has Makes. After cleaning up my table I end up with duplicates in Column A. What I want to do is be able to consolidate all the makes to one unique part number in Column A. I tried posting a pictures but I can't yet because this is my first question.
I hope this makes sense. I just want to be able to create a formula or something that consolidates the part number. This will allow me to do a vlookup and bring all the makes into one cell which is my goal. Thank you!
PART NUMBER MAKE PART NUMBER MAKE
23 HOVERTECHNICS 23 HOVERTECHNICS
25 CUSHMAN 25 CUSHMAN
26 ARGO 26 ARGO
45 ALLSTATE 45 ALLSTATE,CUSHMAN
45 CUSHMAN 46 CUSHMAN
46 CUSHMAN 63 ROKETA
63 ROKETA 64 CAN-AM,HUSQVARNA,KAWASAKI
64 CAN-AM 66 E-Z GO,KAWASAKI,SUZUKI,YAMAHA
64 HUSQVARNA 85 HARLEY-DAVIDSON
64 KAWASAKI 255 ARGO,CLINTON,FRONTIER-TML (Quadra), HEALD, HEALTH KIT
66 E-Z GO
66 KAWASAKI
66 SUZUKI
66 YAMAHA
85 HARLEY-DAVIDSON
255 ARGO
255 CLINTON
255 FRONTIER-TML (Quadra)
255 HEALD
255 HEATH KIT
The end result that I wish for looks like the example on the right.
I'm not sure if this is possible on a mac, if so I have windows as well Excel 2007.

Assuming your source is in ColumnsA & B, with a header row in Row1, then copy B2 into D2 and:
in C2: =IF(A2=A3,"",A2) copied down to suit,
in D3: =IF(A3=A2,D2&", "&B3,B3) copied down to suit.
Then copy ColumnsC&D and Paste Special Values into a new sheet. Filter there to select blanks in the PART NUMBER column and delete selected rows. Unfilter.

Related

Sorting numbers and strings together, where strings are numbers that can be followed by letters

I need to sort an Excel sheet which has a mixture of actual numbers and text containing numbers possibly followed by text.
For example if the following list was randomised, the end result should be:
54 <-- Actual number
55
56
57
57B <-- Number followed by a letter
57M <-- Yet another letter
58
58M
59
59M
60
60B
61
61M
62
62B
63
64
65
66
90
99
99A
100
100B
100B2
120
120B
I tried a million different ways. However, I can't work out a way to sort the sheet like this.
Is there a way to do this? Some sort of "humanised" sorting?
Add a helper column with the following formula:
=TEXT(IFERROR(LEFT(A1,MIN(IF(ISERROR(--MID(A1,SEQUENCE(LEN(A1)),1)),SEQUENCE(LEN(A1))))-1),A1),"000")&IFERROR(MID(A1,MIN(IF(ISERROR(--MID(A1,SEQUENCE(LEN(A1)),1)),SEQUENCE(LEN(A1)))),LEN(A1)),"")
Then sort on that.
Note: Change the "000" to the same number of digits as the largest number in the list.
Also if one does not have SEQUENCE substitute that part with ROW($ZZ$1:INDEX($ZZ:$ZZ,LEN(A1))) The formula would then also need to be confirmed with Ctrl-Shift-Enter instead of Enter when exiting edit mode.
Sorted on Column A:
Sorted on Column B:

Excel =Column() giving #NAME? error

=COLUMN()
This was working fine yesterday but today it gives me #NAME? as the result rather than the column that the formula is in.
What is going on today that's different from yesterday?
Edit: Even more bizarrely if I enter the =COLUMN() using the fx (insert function) button then it works fine.
Thank you for copying over the formula from your Excel here. Otherwise I never would have found it.
The problem is that you have some non-standard characters in your formula which do not show. Doing a 1:1 comparison of your formula with a formula I have written myself into Excel using AscW() I came up with the following result:
Character Letter AscW(yours) AscW(mine)
1 = 61 61
2 C 67 67
3 ? 8204 79
4 ? 8203 76
5 O 79 85
6 L 76 77
7 U 85 78
8 M 77 40
9 N 78 41
10 ( 40
11 ) 41
As you can see, your formula is by two letters longer. There is a AscW(8204) and a AscW(8203) between the C and the O of the word Column. These characters do not show. Yet, they are there.
Also note, that this is not the case everywhere in the Column() you have posted in the above question. The first =COLUMN() at the top of your post is fine and works normally. Furthermore, the first Column in this formula
="Sheet1!"&ADDRESS(IF(ROW()-3<1,1,ROW()-3),IF(COLUMN()-3<1,1,C‌​OLUMN()-3))&":"‌​&ADDRESS(ROW()+3,COLUMN()+3)
is fine. Merely the second column in this formula contains these extra characters. So, I'd like to suggest that you re-type the formula (manually) without copying it from anywhere and you should be fine.

excel incrementation by consecutive numbers

I have a form, thanks to user JamTay317, That lists data depending on folder number (bold number in form). I need to copy it for all 1500 folders (about 400 pages)
Form is divided on 4 labels on a page for easier printing
form overview
Form get it's folder number (nr teczki) from list with all folders from another sheet called "lista teczek":
list of folders
For first 4 folder numbers I use formula:
A2='lista teczek'!A1
J2='lista teczek'!A2
A21='lista teczek'!A3
J21='lista teczek'!A4
When I copy whole page underneath it increments by 36 (number of rows between)
A38='lista teczek'!A37
J38='lista teczek'!A38
A57='lista teczek'!A39
J38='lista teczek'!A40
Instead of A5, A6, etc.
Is there any way to override excel's incrementation to force it to use consecutive numbers? Or at least formula which will make it easier to follow folders list?
So I would use offset() to get the correct position
=A2=OFFSET('lista teczek'!$A$1;ROW(A1)-INT(ROW(A1)/36)*36+4*INT(ROW(A1)/36)-1;0)
So this will offset from A1 in the list sheet.
Below are row numbers a resultant lookup row numbers
Note the formula I used in the offset has an extra "-1" as this is an OFFSET so to get 1 from 1 we need to offset by 0
1 1
2 2
3 3
4 4
37 5
38 6
39 7
40 8
73 9
74 10
75 11
76 12
109 13
110 14
111 15
112 16
145 17
146 18
147 19
----LOGIC--- (edit)
So the idea is that you work out the occurrence you are on. Int(row()/36) gives us this. For example
int(1/36)=0
Int(363/36)=10
First part gives us the offset from the start of the occurrence
3-int(3/36)*36=3
378-Int(363/36)*36=3
Second part give the total of the previous occurrence
4*int(3/36)=0
4*Int(363/36)*36=40
So you need to change the 36 to the gap between the occurrences and the 4 to the length of occurrences Not sure if that helps to explain

Using pre-specified formulas elsewhere in Excel

I am trying to use pre-specified formulas in excel that can simply be referenced and used anywhere in the workbook, without using VBA. The following example illustrates how I wish this to work.
In the following example, the Forumla Specs section lists various functions we would like to use elsewhere in the workbook
The Formula Use section shows how we would like to use them. How would I call the function in the specs area to calculate the calc1 column (and calc2, calc3, etc.) across the variables d1-d4 using the formula specified in Formula Specs for calc1? I would like to use a generic formula that we can use universally to only depend on the column heading (i.e calc1, calc2, etc)?
We have tried using range names, index function, vlookups and various combinations of these to try and achieve this fete, but with no success.
Example
Formula Specs
Calculation Function
calc1 sum(d1,d2,d3,d4)
calc2 sum(d2,d3)
calc3 100*(d4/d3)
Formula Use
obs d1 d2 d3 d4 calc1 calc2 calc3
obs1 24 45 14 41 124 59 292.8571429
obs2 19 28 47 34 128
obs3 29 32 20 24 105
obs4 40 43 28 12 123
obs5 39 16 11 40 106
obs6 17 14 38 14 83
obs7 47 38 26 24 135
obs8 31 25 46 15 117
obs9 25 15 48 11 99
obs10 30 35 32 30 127
obs11 41 43 18 15 117
obs12 10 34 30 47 121
obs13 44 23 10 22 99
Please help!
This is a duplicate of Getting formula of another cell in target cell
Short answer is that you can't without VBA. Also, I don't know why you are so adament about not using UDFs as they are not very complicated to learn about if you are not familiar with VBA.
You could use Named Ranges to achieve this:
Select the first cell you want calc1 to be used in
Create a new named range called calc1
Set its Refers To value to =sum(d1,d2,d3,d4)
Put the formula =calc1 into the cell
Now, when you enter the formula =calc1 into another cell, it will sum cells relative to the new cell.
If you don't want it to be relative, use absolute references in the named range, eg =Sum($D1,$D2)
Tried and tested on Excel 2010

Excel nesting error

I'm using Excel 2013 and I have had to create a If statement which basically chooses a student's grade depending on a certain mark number (obviously, nesting is needed) Here is the If statement I created:
=IF(E2<=20,"N",
IF(OR(E2>=21,E2<=25),4,
IF(OR(E2>=26,E2<=32),"5C",
IF(OR(E2>=33,E2<=38),"5B",
IF(OR(E2>=39, E2<=44), "5A",
IF(OR(E2>=45, E2<=53), "6C",
IF(OR(E2>=54, E2<=61), "6B",
IF(OR(E2>=62, E2<=71), "6A",
IF(OR(E2>=72, E2<=87), "7C",
IF(OR(E2>=88, E2<=103), "7B",
IF(OR(E2>=104, E2<=120), "7A")))))))))))
The error I receive is:
the specified formula cannot be entered because it uses more levels of nesting than allowed in the current file format
My question is, how do I shorten this statement to allow Excel to use it?
Place the logic in the spreadsheet cells. One column for the minimum score, and one column for the grade-:
A B
1 0 N
2 21 4
3 26 5C
4 33 5B
5 39 5A
6 45 6C
7 54 6B
8 72 7C
9 88 7B
10 104 7A
Then do a vlookup to get the grade from the actual score. vlookup will find the highest value in the A column that is less that the lookup value of 38.
In the example vlookup below 38 is the score, A1:B10 is the lookup table 2 is the 2nd column (in this case the B column) that contains the result (the grade).
=VLOOKUP(38, A1:B3, 2, TRUE)
You can also use the following formula.
=LOOKUP(E2;{0;21;26;33;39;45;54;62;72;88;104;121};{"N";4;"5C";"5B";"5A";"6C";"6B";"6A";"7C";"7B";"7C";"No match"})
There are a few different solutions. AND agreements using OR instead of the first that comes to mind.
=IF(E2<=20,"N",
IF(AND(E2>=21,E2<=25),4,
IF(AND(E2>=26,E2<=32),"5C", ...
The best way, in my opinion, is to write a UDF. Then you can use VBA and a CASE statement.
Experiment with this code in VBA to create a UDF named GRADE() - just type it into a MODULE in the VBE:
Function Grade(Marks)
Dim Score As Integer
Score = Marks * 1
Select Case Score
Case 1 To 20
Grade = "N"
Case 21 To 50
Grade = "C"
Case 51 To 90
Grade = "B"
Case 91 To 120
Grade = "A"
End Select
End Function
Then use the Function GRADE() as you would any other function but type the address of the argument - like this GRADE(B7) to use it
=+IF(O3="Negative","Negative",IF(P3="Negative","Negative",IF(Q3="Negative","Negative",IF(R3="Negative","Negative",IF(O3="Refer","Refer",IF(P3="Refer","Refer",IF(Q3="Refer","Refer",IF(R3="Refer","Refer","Positive"))))))))
I find the final status in 4 cells have positive,negative,refer,pending or blank

Resources