Whats the best way to find text after a certain point - excel

In an Excel column called " Asset Name" I am have values like
LDNWSW-LXP17KZ
ADFHGW-WXP17KZ
ASDWSW-DXP17KZ
I need a formula to get the first character right of the hyphen for each value in
another column. The hyphen may occur in any position (except first).
Any pointers? Thanks in Advance
I have tried the formula =RIGHT([AssetName],LEN([AssetName])-SEARCH("-",[AssetName]))

Assuming the input, you have data column AssetName in Table, so this formula:
=MID([AssetName],FIND("-",[AssetName])+1,1)
Should do the job for you. Type it in any column of the Table and better store it as Calculated Column - Excel will suggest you to do so if you enter formula in Table column.

=LEFT(RIGHT(D6,FIND("-",D6)),1)
where data is in D6

You could use something like this;
=MID(A1,FIND("-",A1,1)+1,1)
The FIND function returns the position of the "-" within A1 and the MID function returns the characters from a specified starting position, which in this case is the hyphen.

Related

SUMIFS Excel Multi Criteria

I'm trying to do use SUMIFS to calculate the total QTY changes for drawings with a material ID that Matches the Pipe Indent Numbers and ignore the ones that are NOT listed the piping indent numbers column. Below is what I have so far but I know the "=D:D" looks wrong.
I don't know how to reference all the numbers in the Pipe Indent Numbers List(D:) as each their own criteria, so that if the Material ID matches ANY of the Pipe Ident Numbers it will sum it.
I need help with this because my actual Pipe Ident Numbers column have about 100 other numbers not just the 5 shown.
Also not sure would I need to have the drawing number in the formula somewhere too? Maybe that's what I'm missing...
=SUMIFS(C:C,B:B,"=D:D")
Any help would be amazing! Thanks :)
you can use
if you want to compare row by row
=SUMPRODUCT(c2:c6*(b2:b6=d2:d6))
if you want to compare the value in column b with all values in column d (of you do not use Excel 365 press CTRL+SHIFT+ENTER to enter the formular)
=SUMPRODUCT(c2:c6*(b2:b6=TRANSPOSE(d2:d6)))
Best Regards
Chris
Use:
=SUMPRODUCT(SUMIFS(C:C,B:B,D2:D6))
One can use D:D but that would do many unneeded calculations. One should limit the range to the dataset.

How can I add a comma & space after every two digits in Excel and then format the text?

Here's the table I'm working with:
First off, how can I separate the string of numbers in column C so that they have a comma and space after every two digits?
I was able to partially finish it, but for some reason I can't grab the last two digits. I used this formula:
=MID(C4,1,2)&", "&MID(C4,3,2)&", "&MID(C4,6,2)&", "&MID(C4,10,2)&", "&MID(C4,13,2)&", "&MID(C4,16,2)
After that I need to somehow format that string to look like the example in column E, that's where I'm really confused. Maybe I don't even need the first step?
Any help is appreciated. Thanks
If you already have access to TEXTJOIN formula then it will quickly become your best friend :-)
I assume that your values are in column C (starting from cell C1) and that the column is formatted as text.
Try:
="""stats"":["&TEXTJOIN(", ",TRUE,MID(C1,ROW($A$1:INDEX(A:A,LEN(C1)/2))*2-1,2))&"]"
If your Office 365 version is not using dynamic arrays yet, try entering the formula with Ctrl+Shift+Enter:

Excel Formula - Compare two tables (If match is found in name, calculate difference in charges.)

I am trying to figure out a formula to find and calculate the difference in charges from two tables which has matching facility names. If facility name does not have a match then leave blank or if NA in calculation cell.
Looking at your screenshot I'm assuming the first row after the header is on row 7. You can try to paste this to cell J7:
=IFNA(VLOOKUP(CONCATENATE(RIGHT(F7,2)," - ", G7),B:D,2,FALSE)-H7,"")
What it does is using vlookup function to get the data from the other table. But since they don't have the common value, I use CONCATENATE(RIGHT(F7,2)," - ", G7) to generate common value assuming column B has a unique value.
If I understand your question correctly, this is what you are trying to do:
This is the formula to enter from cell J6 and you can drag it to K6 as well:
=IFERROR(INDEX(C$6:C$12,MATCH("*"&$G6&"*",$B$6:$B$12,0))-H6,"")
Basically, the trick is to use wildcard * to perform this search. Try and let me know if this is what you are looking for.

How can I find the spreadsheet cell reference of MAX() in a range?

With a column range of A1:A20 I have found the largest number with =MAX(A1:A20). How can I find the reference (e.g. A5) of the MAX() result?
I'm specifically using Google Spreadsheets but hope this is simple enough to be standard across excel and Google Spreadsheets.
=MATCH(MAX(A1:A120),A1:A120,0)
The problem is if you get more than one match: it will only give you the first one.
Either :
=ADDRESS(MATCH(MAX($A:$A),$A:$A,0),1)
if you know it's going to be in column A (1)
Or:
=CELL("address",INDEX($A:$A,MATCH(MAX($A:$A),$A:$A,0)))
And yes, it only gives you the first match
You can use something on the lines of the following
=MATCH(MAX(E7:E9),E7:E9)
This will give you the offset from the formula to the biggest number. If you use this in conjunction with ADDRESS you could get the actual cell. However, using offset should probably help you get there if you want to do something on that cell, or another number in the same row as that cell
As of now, there is a QUERY formula that can help with this situation
=ARRAYFORMULA(query({ROW(A2:A), A2:A},
"SELECT MAX(Col1)
WHERE Col2 IS NOT NULL
ORDER BY Col2 DESC"))
ROW(A2:A) represents the row number of each row which you can use the result with ADDRESS to create a reference to a cell.

Why does Excel MATCH() not find a match?

I have a table with some numbers stored as text (UPC codes, so I don't want to lose leading zeros). COUNTIF() recognizes matches just fine, but MATCH() doesn't work. Is there a reason why MATCH() can't handle numbers stored as text, or is this just a limitation I'll have to work around?
Functions like MATCH, VLOOKUP and HLOOKUP need to match data type (number or text) whereas COUNTIF/SUMIF make no distinction. Are you using MATCH to find the position or just to establish whether the value exists in your data?
If you have a numeric lookup value you can convert to text in the formula by using &"", e.g.
=MATCH(A1&"",B:B,0)
....or if it's a text lookup value which needs to match with numbers
=MATCH(A1+0,B:B,0)
If you are looking for the word test for example in cell A2, type the following:
=MATCH(""&"test"&"",A2,0)
If this isn't working then try =Trim and =Clean to purify your column.
If =Trim and =Clean don't help, then just use the left 250 characters...
(As the Match Formula may encounter a timeout/overflow after 250 characters.)
=Left(A2, 250)
If you are using names to refer to the ranges, once you have fixed the datatypes also redefine any names which refer to those ranges.

Resources