Excel Product Codes like this D745FA.08543.C9999 - excel

For work I need to modify an existing excel column in which the product codes wil be entered. The product codes now look like this: D745FA08543C9999
But they need to automatically look like this: D745FA.08543.C9999
I need it to have a dot after the first 6 letter/numbers and after the next 5.
I have no idea how i should go about doing this.
Thanks in advance

I would go like this:
=LEFT(A1,6)&"."&MID(A1,7,5)&"."&RIGHT(A1,5)
This formula takes the first 6 letters of the text in cell A1, then the two in the middle and then five from the right and puts a period sign between each segment.
If you want to do it directly in the cell, you'll need to use a macro to iterate through the cells and do it in place.

Related

Extract text between two characters multiple times on multiple lines in Excel

I want to find an easy way to extract text between characters multiple times within the same cell. So in the example below, I want to take the information between the parenthesis and get them into the adjacent column, as shown. Is there a fast way to do this?
My process has been to use Text to Columns to separate them out into different cells, then use a mid function to get what's between the parenthesis, and string them all back together. I'm wondering if someone can think of a better way to do this. Thank you!
I should note-- I want to do this entirely within excel.
For example:
Formula in B1:
=TEXTJOIN(CHAR(10),1,LEFT(FILTERXML("<t><s>"&SUBSTITUTE(SUBSTITUTE(A1," (",CHAR(10)),CHAR(10),"</s><s>")&"</s></t>","//s[substring(.,1,3)*0=0]"),3))
Enter as array!
If you are interested in FILTERXML, you might want to have a look at this.
Assuming the 1st data is in A1, put :
=REPLACE(A1,1,FIND("(",A1),"") in C1
then,
=IFERROR(REPLACE(C1,FIND(")",C1),FIND("(",C1)-FIND(")",C1)+1," "),C1) in D1
and drag D1 to Q1. lastly, put
=Q1 in B1.
That shall do it.
Idea : replace all text between the ) & ( with a space, 15 times.
hope it helps.

Add cell values having particular text

First, I know that DSUM and SUMIF works with the values in the entire cell. I would like to know if I can add values of cells where part of the string contains a particular text.
Let me explain. I use Google Sheets to manage my expenses, and gather data about my financials. I have something like this—
As you can see, above is a typical example of a day. Each cell has a category, and a description, and below it, the value in the next row. Now is it possible to add values of the cell containing the word "TAXIS"? This way I should be able to get a sum of expenses for a particular category.
I've tried a vast number of expense managers, but none that I am happy with. Finally have decided to go the manual route, and here I am. Any help would be appreciated. Thanks in advance!
You can use wild card to add part of string. Suppose you data starts from C2 cell and data goes like your screenshot then you can use following formula.
=SUMIF(C2:K2,"*TAXIS*",C3:K3)
Obviously you have to customize formula based on your sheet from where data starts and ends.

Replace Last 2 Digits

I would like to create a way to search through column "B" and replace the last two digits of values listed.
For example,
I'd like to have,
502040155 replaced to 5020400,
403041055 to 4030400,
603054055 to 6040500,
etc.
I'm assuming a LEFT or RIGHT formula is needed? VBA or formula works fine.a
I'm going to assume that your last example was a typo. Try,
=FLOOR(A2/100, 100)

I need help consolidating a list of supplier names that change periodically?

I have a spreadsheet that I am using as a questionnaire.
One of the questions is Who are your wheel suppliers (mark all that apply)? and there are 6 check boxes in column C to select 5 different wheel suppliers and an Other option. I have these check boxes linked to return whatever suppliers name is selected in the cell adjacent to the cell the check box is in in column I.
So depending on what wheel suppliers the customer selects there could be anywhere from 1-6 different suppliers selected. So once the customer has selected the wheel suppliers whatever suppliers are selected will show up in the correct cell in range I45:50.
What I am having a problem with is that I need these to pull into a data tab into one cell. I am having a problem coming up with a formula to put all the suppliers together as a list in one cell with commas separating each. Remember, it could be 1 supplier, could be 3, could be 6.
Any advice is much appreciated. I have tried using If formulas and Concatenate but I can't seem to figure out how to get it to work like I want it to.
=CONCATENATE(Questionnaire!I45," ",Questionnaire!I46," ",Questionnaire!I47," ",Questionnaire!I48," ",Questionnaire!I49," ",Questionnaire!I50)
That is the best I've come up with but the problem with it is if the first supplier isn't selected then it will enter that space anyways and if the first supplier and the last supplier are selected it will have all those spaces in between.
Another method, this one using helper cells.
Say you have the data in A1:A6. In B1, input this formula: =IF(LEN(A1)>0,A1&",",""). Drag down to B5.
In B6, slight variation: =IF(LEN(A6)>0,A6,",""").
In C1: =CONCATENATE(B1,B2,B3,B4,B5,B6).
What happens is the cells in the B column checks if their respective values in the A column are not blanks. If not, they will append , to it. Otherwise, they will return blanks (not spaces). The only variation is B6--since it's the end of the list, there's no , appended to it.
It's only a matter of concatenating them at this point. Removing any of the values in A, maybe by unchecking their checkbox, will reflect the change in C1 properly.
Let us know if this helps.
EDIT:
To accommodate your formula, change your CONCATENATE formula to something like below:
=LEFT(CONCATENATE(...),LEN(CONCATENATE(...)-1)
What is does is it removes the rightmost character by getting, from the left, all the characters up until one less than the length of the result. Obviously, fill in the ... with the ranges you want to concatenate.
Let us know if this is what you need.
FURTHER EDIT:
=LEFT(CONCATENATE(Questionnaire!F45,Questionnaire!F46,Questionnaire!F47,Questionnaire‌​!F48,Questionnaire!F49,Questionnaire!F50),LEN(CONCATENATE(Questionnaire!F45,Questionnaire!F46,Questionnaire!F47,Questionnaire‌​!F48,Questionnaire!F49,Questionnaire!F50))-1)
Looks ugly, right? But does the job. Better if you use a named range, though, like below:
Now it's much shorter. Error on my end is because I don't have Questionnaire sheet, obviously.
If J44 is blank and you are prepared to add something like =IF(ISBLANK(I45),J44,J44&I45&", ") in J45 (copied down) then perhaps:
=SUBSTITUTE(LEFT(wheelC,LEN(wheelC)-2),0,"")
might suit, where wheelC is a named range of workbook scope for Questionnaire!J50.

Excel - How to add value after 3rd /

I have excel file with one value that need to be edited. It's link to a image.
My link template looks like this:
this
http://website.com/something/brand/product/product_name/image.jpg
I need to add 'medium' after /product/
so my template would be
this
http://website.com/something/brand/product/medium/product_name/image.jpg
example:
http://website.com/cake/cutie/bigcakes/pink_caramel/hr74.jpg
would be
http://website.com/cake/cutie/bigcakes/medium/pink_caramel/hr74.jpg
Of course all products are different, so can i maybe say something like, add medium/ after 6th / ? I don't know how else, as its huge file with thousands of products, brands and product names.
Well, using the formula of #SkipIntro, you can use the CONCATENATE, LEFT and MID formulae to get your desired result.
=CONCATENATE(LEFT(A1,FIND(CHAR(1),SUBSTITUTE(A1,"/",CHAR(1),6))),"medium",MID(A1,FIND(CHAR(1),SUBSTITUTE(A1,"/",CHAR(1),6)),100))
This assumes your link template is in cell A1. If it's in any other cell, replace the A1 with the required cell address.
EDIT:
I overlooked a much simpler one ^^; :
=SUBSTITUTE(SUBSTITUTE(A1,"/",CHAR(1),6),CHAR(1),"/medium/")
You can incorporate Skip Intro's suggestion into a REPLACE function like this
=REPLACE(A1,FIND(CHAR(1),SUBSTITUTE(A1,"/",CHAR(1),6))+1,0,"medium/")

Resources