I have data in excel like this
A B C
p1 ABC 2
p2wt ABC 3
p3 EFG 1
p3wtke EFG 1
p9r EFG 2
I'm trying to sum up C column if B column has same data and concatenate A column data. And data looks like
A B C
p1-p2wt ABC 5
p3-p3wtke-p9r EFG 4
I tried using =SUMIFS(C1:C5,A1:A9,B1) but it is giving #value, and how do i concate A? I tried Excel concatenate, but is A2>A1 in this link is for number fields?
Use a helper column.
In D1 put:
=IF(B1<>B2,A1,A1&"-"&D2)
Then copy/drag down the data set.
The in another column create a list of the unique values in column B. I put mine in G.
Then in F1 I put:
=VLOOKUP(G1,B:D,3,FALSE)
And in H1 I put:
=SUMIF(B:B,G1,C:C)
Then copies/dragged down.
Related
I have a data set that looks something like this-
Item
Value
A
1
A
2
A
3
B
1
B
2
B
3
C
1
C
2
And I want to convert it to this -
Item
Value
A
1,2,3
B
1,2,3
C
1,2
Using your provided example data, and assuming a data setup like this:
In cell D2 and copied down is this formula to get unique items: =INDEX($A$2:$A$9,MATCH(0,COUNTIF(D$1:D1,$A$2:$A$9),0))
In cell E2 and copied down is this formula to get the joined values: =TEXTJOIN(",",TRUE,REPT($B$2:$B$9,$A$2:$A$9=D2))
Adjust the ranges to suit your actual data.
I am have a list of data in Column A with different lengths in the following format:
ABC Radiologist 100; ABC Nurse 200; ABC Technologist 300; ABC Biller 400; ABC Coder 500
I am trying to extract each line of data into a separate column to show as such:
Course 1 Course 2 etc
ABC Radiologist 100 ABC Nurse 200
I need each course name to be in a separate column.
I used this formula in column B:
=MID(A1,1,SEARCH(";",A1)-1)
and this formula in Column C:
=TRIM(MID($A$1,LEN(B1)+2,FIND(";",$A$1,LEN(B1))))
This formula returns values, but because of the varying lengths of the data, in Column C, it cuts the data off or adds data after the third ;
Any suggestions?
I need to repeat this formula up to 9 times
With data in A1, enter this in B1:
=TRIM(MID(SUBSTITUTE($A1,";",REPT(" ",999)),COLUMNS($A:A)*999-998,999))
and copy across.
EDIT#1:
We are copying B1 across. So C1 would contain:
=TRIM(MID(SUBSTITUTE($A1,";",REPT(" ",999)),COLUMNS($A:B)*999-998,999))
and D1 would contain:
=TRIM(MID(SUBSTITUTE($A1,";",REPT(" ",999)),COLUMNS($A:C)*999-998,999))
etc.
I have the following Excel spreasheet:
A B C
1 =IF(B1<>"",B1;OFFSET(B1,-1,0)) CompanyA
2 =IF(B2<>"",B2;OFFSET(B2,-1,0))
3
4 CompanyB
5 CompanyC
6
7 CompanyD
In column B I have a list of different companies and it might happen that they are empty rows (in this case row2, row3 or row6) between the companies.
In column A I want to achieve that the empty rows are filled with the company names so in the end the spreadsheet looks like this:
A B C
1 Company A CompanyA
2 Company A
3 Company A
4 Company B CompanyB
5 Company C CompanyC
6 Company C
7 Company D CompanyD
I tried to use the If-formula with the offset in column A but it only works when there is not more than one empty row so it only works for CompanyB,C and D but not for company A.
Do you have any idea which formula I have to use in column A to solve this issue?
Pls refer the snap below
In A2 apply the below formula and drag down
=IF(B2<>"",B2,A1)
EDIT #1: Another method if data starts with row 1
if the data starts with B1 then apply the below formula in A1 and drag down
=IF(B1<>"",B1,IF(ROW()=1,B1,OFFSET(A1,-1,0)))
Provided the first cell, say B2, is not empty try with:=B2 in cell A2 and =IF(B3<>"";B3;A2)in cell A3 and fill down.
I have an excel file with 5 rows in column A and B, and 3 in column C and D (in reality though, I have a couple of hundreds of rows). Column B consists of text belonging to A, and D of text belonging to C. Column C has some of the values found in column A.
It looks like this:
A B C D
1 1 stringA1 1 stringC1
2 2 stringA2 2 stringC2
3 3 stringA3 4 stringC3
4 4 stringA4
5 5 stringA5
Now, I would like to match the numbers in column C with those in A, so that matches are put in the same row. For those rows in A for which there is no match in C, I want to have blank cells after column B.
It would look like this in this case:
A B C D
1 1 stringA1 1 stringC1
2 2 stringA2 2 stringC2
3 3 stringA3
4 4 stringA4 4 stringC3
5 5 stringA5
I have some idea that I should use VLOOKUP and maybe Conditional Formatting, but unfortunately I am not very experienced in excel. Could someone please suggest a way to do this?
Enter the following formula in Cell E1:
=IF(IFERROR(MATCH(A1,$C$1:$C$5,),"")<>"",INDEX($C$1:$D$5,IFERROR(MATCH(A1,$C$1:$C$5,),""),1),"")
and this one in Cell F1:
=IF(IFERROR(MATCH(A1,$C$1:$C$5,),"")<>"",INDEX($C$1:$D$5,IFERROR(MATCH(A1,$C$1:$C$5,),""),2),"")
Using Helper Column:
You can also do this using a helper column.
In Cell E1 write:
=IFERROR(MATCH(A1,$C$1:$C$5,),"")
Then in Cell F1 write:
=IF(E1<>"",INDEX($C$1:$D$5,E1,1),"")
And finally in Cell G1 write:
=IF(F1<>"",INDEX($C$1:$D$5,E1,2),"")
This was answered by #user3514930 to a question here.
You can directly use this formula in D2 and copy downwards:
=IF(A2 = C2, A2, "")
Now if you have formulas in A2, C2, type in those formulas in place of A2, C2 in the above.
i have 3 columns
A B C D
11H 3HI xyz
2AB 2CD dfd
3HI 11H 123
I am struggling for the formula through which i can compare column A & B and if matched the adjucent cell value should be written in column D. For example
A B C D
11H 3HI xyz 123
2AB 2CD dfd ---
3HI 11H 123 xyz.
my column consisting of 43000 cells vertically. i have to compare all these values and write the results using excel. Please help me with this.
Thanks in advance.
The formula you're after is:
=VLOOKUP(A1,$B$1:$C$3,2,FALSE)
Here's an image. Always show your attempts. We tend to help those who have attempted to help themselves more.
However, if the dashes are a must instead of the #N/A in D2, then this is the formula
=IFERROR(VLOOKUP(A3,$B$1:$C$3,2,FALSE),"---")