I have two different Excel spreadsheets. They have almost the same data, but it has been updated so some entries are not there anymore or some items have been added.
I feel that this shouldn't be too difficult, but I cannot figure it out. I have attached a screenshot to help explain it.
I have some items that are labeled "I" or "O" for inside or outside in the "E" columns. I need these in my new spreadsheet, and there are 300 or so of them.
The values that are the same and need to match are KVA, LOW_VOLTAGE,COXX, and HIGH_VOLTAGE (rows A, B, C, and D).
I would like to somehow have the formula look at these values from the original sheet, and if they are the same, it will put an "I" or "O" in the field "E" in my new sheet.
Thank you very much for helping me!
(I can't post an image yet, so I tried to break it down here. Notice that only one row matches, so I would like that to update with "I".)
Original Sheet
A B C D E
1.5 120 99 7000 I
5 300 143 10000 O
NEW SHEET
A B C D E
1 100 87 500
1.5 120 99 7000
20 450 10 200
*rows A, B, C, and D is confusing but perhaps concatenate values from the original sheet, in a helper column (say F) along the lines:
=A2&"|"&B2&"|"&C2&"|"&D2
copied down to suit and then in the new sheet something like:
=IF(ISERROR(VLOOKUP(A2&"|"&B2&"|"&C2&"|"&D2,Original!F:F,1,0)),"O","I")
copied down to suit.
Related
I am trying to sum values based that equal a lookup value. However, that value is actually a list of values delimited by a comma. Below is an example of what I mean.
Suppose I have raw data in the form of sheet1 below:
Sheet1:
A
B
1
ID
VALUE
2
A
30
3
A
50
4
A
20
5
B
10
6
B
20
7
C
70
8
C
40
9
D
30
10
E
50
11
F
20
12
F
30
13
G
10
And I have a look table that groups all IDs by their respective teams, as per sheet2 below.
Sheet2:
A
B
1
TEAM
IDS
2
Red
A, B
3
Blue
C, D
4
Green
E, F, G
And I want to create a report where the user can select the team name, and the sum of the values in sheet1 will aggregate based on the selection, as per the following example. So the user would select "Green" in cell B1 and it would return the sum of values that correspond to E, F, and G in sheet1.
Report:
A
B
1
Select Team:
Green
2
Sum:
110
I have searched all over for a solution to this and was able to find something similar. I tried to repurpose the formula for my data but couldn't get it to work because I think that solution dealt with numbers rather than text.
Excel: Perform a SUMIF where the criteria is a comma-delimited list
Any suggestions would be greatly appreciated!
Edit: Just want to add that I realize I could first parse out the IDs in sheet2, however I'm looking for a formula that can bypass that as my real dataset is quite large and parsing out the IDs under each team would explode the number of rows.
A variation of #JvdV solution on the linked question:
=SUMPRODUCT(SUMIFS(Sheet1!B:B,Sheet1!A:A,FILTERXML("<t><s>"&SUBSTITUTE(VLOOKUP(Sheet2!F1,Sheet2!A:B,2,FALSE),",","</s><s>")&"</s></t>","//s")))
Note, this only works with Excel 2013 or later and only on PC. FILTERXML is not available on Mac or prior to 2013.
If Mac or prior to 2013:
=SUMPRODUCT(SUMIFS(Sheet1!B:B,Sheet1!A:A,TRIM(MID(SUBSTITUTE(VLOOKUP(F1,Sheet2!A:B,2,FALSE),",",REPT(" ",999)),(ROW($ZY1:INDEX($ZY:$ZY,LEN(VLOOKUP(F1,Sheet2!A:B,2,FALSE))-LEN(SUBSTITUTE(VLOOKUP(F1,Sheet2!A:B,2,FALSE),",",""))+1))-1)*999+1,999))))
I have the following in an excel spreadsheet:
A B C
1 ID Label Text
2 123 R Some text
3
4 456 S Some more text
5
6 789 R Even more text
But I want to close the row gaps so my excel spreadsheet can look like the following
A B C
1 ID Label Text
2 123 R Some text
3 456 S Some more text
4 789 R Even more text
5
6
I found the following https://www.extendoffice.com/documents/excel/511-merge-rows-keep-data.html but it is not quite what I am looking for
Question: Is there an automated/easier way to close the row gaps, aside from doing this manually?
(I can do this manually by cutting and pasting but my excel sheet contains thousands of rows that contain these sort of row gaps)
You could do an index match. In another column (say column D), simply do something like if(a3="", "", row()). Then in another column rank each row if there is a value. Something like if(d3="", "", rank(d3, $d$1:$d$6). Create another column (say column E) that just goes from 1 to the end of the data set (increment each row by 1). Finally do an index match like so: index(A:A, match(d3, $E:$E, 0).
Per Jeeped and tehhowch, the easiest way to accomplish the goal is to simply sort by column ID value
I need help on a loooong list of values that is possibly having duplicates with its quantity needed to sum however while retaining its duplicates.
Hard to explain, example of scenario and goal I'd like to achieve.
Please help.
Current Situation
material value
a 10
b 10
a 10
c 10
c 10
a 10
b 10
b 10
b 10
Goal to Achieve
material value
a 30
b 40
a 30
c 20
c 20
a 30
b 40
b 40
b 40
Something like above. I'm jumbled up with the formulas. Please help!
One important point to consider here: First, because you need to sum values AND change the values you're summing, you're going to get a circular reference if you try to do this dynamically.
One way to get around this is to add a third column, with the formula =SUMIF(A:A,A1,B:B)
If you absolutely need the values in column B, just copy from C, then paste the values, or just hide column B.
Im using Excel 2010... This problem has been plaguing me for hours and would save me a lot of time, I have really tried searching for the answer but dont know what I am looking for without explaining in detail.
Basically I have 5 columns of data. Column A contains a list of selected names, Column B contains a list of all names and Columns C to E contain data relating to all names:
A B C D E
steve adam 54 london car
doug andrew 25 essex walk
adam bert 31 newcastle walk
omar barry 47 london car
chuck 23 herts cycle
(columns continue)
I need to be able to sort the data so that the names in column A are in order and the other data in columns B to E match what is in column A with any non matches at the bottom of each list. So the result would look like:
A B C D E
adam adam 54 london car
doug doug 37 norfolk walk
omar omar 31 dudley jog
steve steve 74 london cycle
andrew 25 essex walk
(columns continue)
In real terms I have a list of thousands of names and need to match hundreds of names to them. If any one can help with this it would save me hours of work. I have tried searching and have watched many youtube vids on vlookup but nothing seems to be specific to what im after.
Thanks in advance
George
Excel might not be the best tool for the job but try this:
Order column A by itself
In cell F1, use this formula: =IFERROR(VLOOKUP(B1, A$1:A$4,1,FALSE), CHAR(142)). Replace the "4" in A$4 with the number of your last row of data (in both columns A and B).
Copy that down column F to the last row of data. You will see a Ž in rows where there isn't a match between A and B.
Select the data in columns B to F (leave A out) and sort using columns F as the first level and B as the second level (a single sort operation).
The data in A and B should align with the extra rows in B at the end.
If it doesn't align it means you have values in A that are not in B. Select the values in F, copy and paste special (values only) over the values in A. Delete all the Žs from the end.
Delete column F
I've got an excel document that essentially looks like this (imagine it having around 15 000 rows):
A B C D E F
---------------------------
Art Price Art Price
---------------------------
A 1 A 5
A 3 B 10
A 4 C 8
B 7
B 2
C 3
C 15
As you can see the prices in column B are inconsistent.
What I want to do is to set the prices (in column B) to the correct prices (that are found in column E) based on the articles name (found in column A and D).
Unfortunately I'm at loss when it comes to VBA in Excel, and formulas in Excel, what would be a smart way to approach (or solve) this?
Thank you in advance!
Try the VLOOKUP excel formula in the excel help, no coding needed.
Enter =VLOOKUP(A2;$D$2:$E$4;2) in cell B2 and fill down.