I have some alphanumeric data in column A on sheet A. Something like this:-
abcd-1234
and so on and some value corresponding to every value in col B.
On another sheet i have 1234 means only the numeric part of this data on sheet B. Now i want to sum the data on col B on Sheet A with matching value in Sheet A. I have tried this so far:-
=SUMIFS(A!$A$1:$A$100,RIGHT(A!$B$2:$B$100,4),$A1)
But it is not working. Please help!!
Your explanation and your formula don't match. Let's assume column A has the alpha-numeric values and column B has the values you want to sum.
Try Sumproduct. Also when you extract the numbers from the text with the RIGHT() function, the result will still be text. If the value in A1 is a number, you need to coerce the extracted text into numbers.
=SUMPRODUCT(A!$B$1:$B$100*((RIGHT(A!$A$2:$A$100,4)+0)=$A1))
Related
I have sheet like this :
How can I concatenate values in column B based on value in column A.
Values corresponding to ID 1.1.1 are of B2:B5
Similarly, values for ID 1.1.2 are of B6:B8 and so on..
Its like it start from first id, lookup until next id, all values in column B until next Id in column A is concatenated
the result should be like this : 2,3,4,5 in single cell of column D
I am not sure if this would solve your purpose, but you can keep concatenating values till the value in column A is same and use the last value.
Assuming the case you provided, paste the formula =IF(A2<>"",B2,D1&", "&B2) in cell D2 and copy throughout the column. You can additionally create a flag for changes in column E using =IF(A2<>"",1,"") in cell E2. The results would be like this.
It's still not quite clear, what you are trying to achieve, but to simply concatenate columns with a comma as separator, you can try something like the following:
In column d2 (or column d5), type in the following formula
=B2&","&B3&","&B4&","&B5
That should get you in the right direction.
I have the following data set: and use the index/match function to check if the value in column A has a corresponding value in column b compared to values that are in another sheet called Data:
=IFERROR(INDEX(B:B,MATCH('Data A1'!,A:A,0)),"")
The goal of this exercise is to identify there is value in column B for any value in column A and here is where my formula fails, because for value 2 the formula returns an empty cell, because it is only checking for the first value in the list and not all values.
Any ideas on how I can fix the formula to reflect ABC when the value 2 is in the list? I am hoping for an outcome like this:
Thanks for your help!
It may be better to use a blank column to do this. In a blank column put the following formula in the first row:
=IF(B1="",SUMPRODUCT(($B$1:INDEX($B:$B,MATCH(1E+99,$A:$A))="")*($A$1:INDEX($A:$A,MATCH(1E+99,$A:$A))=A1)),B1)
Then Copy down the range.
I have found VLOOKUP and it does not seem to match all of the criteria I need to perform.
The following is what has stopped me at this time. I would appreciate any assistance.
in excel, I need to match a value from a specific cell in spreadsheet A, column B, with a range of values in spreadsheet B, column C. Then in the row that the value in spreadsheet B is found, I need to obtain the value for the cell in column P and copy it into spreadsheet A column N.
Thank you,
While VLOOKUP has its uses I would always recommend using the INDEX function instead as you are not limited by using the leftmost column.
I think the type of formula you are looking for is (to be put in column N of spreadsheet A):
=INDEX('[Spreadsheet B]Sheet1'!P:P,MATCH(B1,'[Spreadsheet B]Sheet1'!C:C,0))
This would match the specific cell of B1 in Spreadsheet A with a value in column C in Spreadsheet B and then give provide the value in column P of the corresponding row. Obviously you should change out 'Spreadsheet B' with the name of your workbook and 'Sheet1' for the name of the worksheet in Spreadsheet B.
I'm trying to extract specific values from a specific cell where Column A is the input and Column B is the output.
Column A Column B
AB,CD,EF,GH,IJ,KL ABCDEFGH
AB,CD,MN,EF,OP,UV ABCDEF
QR,AB,ST,CD,GH,WX ABCDGH
The formula i am using in Column B is:
=CONCATENATE(MID(A2,(SEARCH("A",A2,1)),2),MID(B2,(SEARCH("CD",B2,1)),2),MID(B2,(SEARCH("EF",B2,1)),2),MID(B2,(SEARCH("GH",B2,1)),2))
However if i am to drag down the formula until the last row, it will return a #VALUE! since some of the values in the SEARCH formula did not appear Column A.
So what I need is a generic formula that will only extract the values AB,CD,EF,GH OR whatever value is available in Column A just like in my example.
Best Regards,
I would condition on whether or not something exists, and print it accordingly:
Column B's formula uses an approach that matches
IF(ISERROR(FIND(<string>,<within_string>)),"",<string>)
and concatenates these using &. ISERROR avoids error outputs, while also helping to place content (an empty string "" in this case).
I have tried finding this solution on the web but have not had success for this specific problem. In Excel 2010 I have some data in column A where each value may partially contain data in column B.
EX:
Column A might contain "http://google.com/webmasters"
Column B might contain "google.com"
This should give me a match.
I want to print in Column C all values in column A that do not contain any values from column B.
EX:
Column A
http://dir.mydomain.tdl
http://myotherdomain.tdl
http://blog.otherdomain.tdl
http://www.lastdomain.tdl
Column B
mydomain.tdl
lastdomain.tdl
Column C (results required)
http://myotherdomain.tdl
http://blog.otherdomain.tdl
Any help would be greatly appreciated.
I think I have the solution using ARRAY formula. Assuming your input AND that columns A-C have titles, or simply, strings are listed starting cells A2 and B2, do the following:
C2: type the formula =IF(OR(NOT(ISERROR(SEARCH(INDIRECT("B2:B"&(COUNTA($B:$B))),$A2)))),"",$A2) but press CTRL+SHIFT+ENTER instead of usual ENTER - this will define an ARRAY formula and will result in {} brackets around it (but do NOT type them manually!).
Autofill formula in C2 until the end of list in column A, e.g. if the last value is in A100, then autofill up to C100 (how long column B does not matter here).
You may then copy & paste obtained results as values and sort out empty strings.
Here you go! The key here - we check every string in column A for having at least one match among array of strings in column B, and return empty string in case at least one match found.
For your convenience sample file is shared: https://www.dropbox.com/s/janf0xxon4z2yh5/DomainsLookup.xlsx
Maybe not the must efficient but you could simply use two arrays - one for Column A and one for Column B. Iterate through ColumnA array to see if it exists in ColumnB array (use Array.IndexOf or .contains). If it does you could remove it from the ColumnA array and output the remaining values in Column C as the remainder.