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/")
Related
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.
There are two sheets (sheet1 & sheet2) in my Excel file, it's like daily work routine (entry date, pickup date, dispatch date). Some details will change as per the work flow and even new entries will appear.
I just need to compare both files if a change occurred in one cell it must have to show entire row of sheet1 (I can't specify exact headline for that all details are too precious and it has more than 100 headlines).
So if there is any formula for that please let me know like
IF+VLOOKUP
please correct below given formula
=If(RECHERCHEV(A2,sheet1!A8:FM264,1,FAUX)=(RECHERCHEV(A2,sheet2!A8:FM257,1,FAUX);"";RECHERCHEV(A2,sheet1!A8:FM264,1,FAUX))
It's the French version.
Try this array formula in cell A1 of sheet3 and drag across and down.
=IF(AND(EXACT(Sheet1!1:1,Sheet2!1:1)),"",Sheet1!A1)
Not really sure what you're looking to do here, and I don't speak french, but it looks like you have an extra parenthesis before your 2nd RECHERCHEV function.
Try this :
=If(RECHERCHEV(A2,sheet1!A8:FM264,1,FAUX)=RECHERCHEV(A2,sheet2!A8:FM257,1,FAUX);"";RECHERCHEV(A2,sheet1!A8:FM264,1,FAUX))
Though I'm not sure why the IF function uses semi-colons, but the RECHERCHEV uses commas, so maybe this:
=If(RECHERCHEV(A2,sheet1!A8:FM264,1,FAUX)=RECHERCHEV(A2,sheet2!A8:FM257,1,FAUX),"",RECHERCHEV(A2,sheet1!A8:FM264,1,FAUX))
Also it seems you want the entire row to update, so I am not sure how this vlookup would work since the arrays start in different rows than the lookup value.
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.
So this works:
=IF(OR(D2="MEXICO",D2="TURKEY",D2="CHINA",D2="BRAZIL",D2="INDIA",D2="INDONESIA",D2="POLAND",D2="COLOMBIA",D2="ARGENTINA",D2="PHILIPPINES"),D2,"Others")
But this doesn't
=IF(D2=OR("MEXICO","TURKEY","CHINA","BRAZIL","INDIA","INDONESIA","POLAND","COLOMBIA","ARGENTINA","PHILIPPINES"),D2,"Others")
Is there a way to get around writing D2= inside every single time? I am looking to see if the criteria can be used in multiple places .. say in a different sheet I also have country names, but just not in column "D".
You can use something like this:
=IF(ISERROR(VLOOKUP(D2,{"MEXICO","TURKEY"},1,0)),"Others",D2)
Futhermore, as #barryhoudini suggest, in excel 2007 or later you can use:
=IFERROR(VLOOKUP(D2,{"MEXICO","TURKEY"},1,0),"Others")
I would suggest that you create a list of country names in a column in a sheet somewhere and use that as a look up where ever you need it. You can create a separate sheet with this data, say datasheet.
Let's say you have a list of countries in A1:A25 of datasheet, you can then do something like this:
=IF(COUNTIF(datasheet!A1:datasheet!A25, D2) <> 0, D2, "Other")
Additionally, I would create a named range for the set of country names if I expect them to change in the future. This way my formulas will refer to the name and if I add countries I do not have to change the formulas.
It's possible to use OR but you need to change the syntax a little - like this
=IF(OR(D2={"MEXICO","TURKEY","CHINA","BRAZIL","INDIA","INDONESIA","POLAND","COLOMBIA","ARGENTINA","PHILIPPINES"}),D2,"Others")
Alternatively, this should work for you:
=IF(ISNA(MATCH(D2, {"MEXICO","TURKEY","CHINA","BRAZIL","INDIA","INDONESIA","POLAND","COLOMBIA","ARGENTINA","PHILIPPINES"}, 0)), "Others", D2)
I don't use excel often, and I haven't really found a good solution to my problem. (which is probably really simple).
I would like to have a cell with a function in my spreadsheet that shows another cell value value that depends on yet another cell value.
Such as:
The Best Deal heading simply uses the formula
=MAX(D3,D1000)
But under Best Deal I would like to display the Name Test1 rather than the numeric value.
Another thing that would be nice to know, is if there is a way to know the maximum row with data in it. So rather than =MAX(D3,D1000) something like =MAX(D3,Max(RowCount_InD))
Obviously that function wouldn't work as I wrote it, but hopefully this pseudo code gives you an idea of what I mean. The purpose is that if more entries are added, it would be able to handle them.
I know this is possible, but I'm having some trouble. Hopefully I can get some help here.
Thanks!
The easiest way to do this is to use a combination of Index and Match. Match will find the position of the maximum value, and then Index will look in column A and return the data in that same position. So, your formula would be:
=INDEX(A$3:A$1000,MATCH(MAX(D$3:D$1000),D$3:D$1000,0))
Put that formula in F3. No hidden columns required.
Sorry, I missed the part about the expanding range. You can do that by using Count or CountA along with Offset. The new formula would be:
=INDEX(A3:OFFSET(A3,COUNTA(A:A)-1,0),MATCH(MAX(D3:OFFSET(D3,COUNT(D:D)-1,0)),D3:OFFSET(D3,COUNT(D:D)-1,0),0))
More complex, but it is basically the same except that it will expand as you add new values at the end.
There is only one 'simple' way I can think of this, but it requires hidden columns (sorry).
set E1 = A1 and fill down all the way (Basically you are making a copy of column A in column E but you are using a formula so it will always be the same)
Then under 'Best deal' - put this formula:
=VLOOKUP(MAX(D3,D1000),$D:$E,2,FALSE)
Then hide column E so it doesn't look like a mess. This way you do not need any fancy macro's and it will work everywhere because it is a normal formula.
"Another thing that would be nice to know, is if there is a way to know the maximum row with data in it. So rather than =MAX(D3,D1000) something like =MAX(D3,Max(RowCount_InD))"
This is a called a dynamic named range. Create a name for the ratio data, and set up the formula for the name range to be this:
=OFFSET($D$3, 0, 0, COUNTA($D$3:$D$1048576), 1)
More info here: http://www.ozgrid.com/Excel/DynamicRanges.htm
Then, assuming you name this named range ratio_data, your function could be referring to =MAX(ratio_data) in combination with index-match as suggested by #Tim Mayes. The range will expand automatically as you add more data.
=INDEX(A$3:A$1000,MATCH(MAX(ratio_data),ratio_data,0))
Ideally, you can replace the A3:A1000 by a dynamic named range as well.