i want to get the last value after / in excel.
www.google.com/new/oldpage.php
www.google.com/new/hello/wright.html
www.facebook.com/face/newface/demo.php
from the above link i want to separate the pagename
for eg. from 1 url output should be www.google.com/new/ 2nd www.google.com/new/hello/ and so
i used RIGHT formula but we can define only static. pls. provide if any one has the solution.
If A1 is www.google.com/new/oldpage.php, use this code to get www.google.com/new/:
=LEFT( A1, FIND( "|", SUBSTITUTE( A1, "/", "|", LEN(A1)-LEN(SUBSTITUTE(A1,"/","")) ) ) )
Use this code to get oldpage.php:
=RIGHT(A1,LEN(A1)-FIND("|",SUBSTITUTE(A1,"/","|",LEN(A1)-LEN(SUBSTITUTE(A1,"/","")))))
As you can see, you need to SUBSTITUTE some chars before calling the FIND method.
Depending on your regional options, you must change "," (comma) in the formula for ";" (semicolon).
Use this formula,
=MID(A16,SEARCH("^^",SUBSTITUTE(A16,"/","^^",LEN(A16)-LEN(SUBSTITUTE(A16,"/",""))))+1,999)
Excel doesn't provide a formula for reverse string searches so the following must be used
=IF(ISERROR(FIND("/",A1)),A1,RIGHT(A1,LEN(A1)-FIND("~",SUBSTITUTE(A1,"/","~",LEN(A1)-LEN(SUBSTITUTE(A1,"/",""))))))
Related
In the below Vllokup function.
I want to use a variable instead of using hard-coded value as "No Category"
=IF( ISNA( VLOOKUP(Param)),"No Category", IF(LEN(VLOOKUP(Param)) =0,"", VLOOKUP(Param) ))
I tried like the following way , unfortunately i can't make it.
=IF( ISNA( VLOOKUP(Param))," & VarCategory & ", IF(LEN(VLOOKUP(Param)) =0,"", VLOOKUP(Param) ))
Many Thanks
You can use a cell in your spreadsheet as a search box. For example, say you pick cell A1 as the box that can contain whatever you type into it. Your formula can then say:
=IF( ISNA( VLOOKUP(Param)), A1 , IF(LEN(VLOOKUP(Param)) =0,"", VLOOKUP(Param) ))
Now your VLOOKUP is no longer hard coded. It will look based on whatever is in cell A1.
Essentially:
I have a cell value that looks like this:
Hello - (Whats Up (HowAreYou))
I need to extract the value of what is inside the outside parenthesis:
Whats Up (HowAreYou)
How can this formula be modified to accommodate this requirement:
=MID(C11,SEARCH("(",C11)+1,SEARCH(")",C11)-SEARCH("(",C11)-1)
use FILTERXML:
=FILTERXML("<a>"&SUBSTITUTE(SUBSTITUTE(A1,"(","<b>",1),")","</b>",LEN(A1)-LEN(SUBSTITUTE(A1,")","")))&"</a>","//b")
Or:
=MID(REPLACE(A1,FIND("#",SUBSTITUTE(A1,")","#",LEN(A1)-LEN(SUBSTITUTE(A1,")","")))),999,""),FIND("(",A1)+1,999)
Try:
=MID(A1,SEARCH("(",A1)+1,SEARCH("#",SUBSTITUTE(A1,")","#",LEN(A1)-LEN(SUBSTITUTE(A1,")",""))))-SEARCH("(",A1)-1)
Amongst the other good answers, you could alternatively try:
=REPLACE(LEFT(A1,MATCH(2,1/(MID(A1,SEQUENCE(LEN(A1)),1)=")"))-1),1,FIND("(",A1),)
Or, without Excel 365:
=REPLACE(LEFT(A1,MATCH(2,1/(MID(A1,ROW(A$1:INDEX(A:A,LEN(A1))),1)=")"))-1),1,FIND("(",A1),)
Note: This last formula requires you to enter as array formula through Ctrl+Shift+Enter
You can also use "Text To Column" function. You can find it in data tab in data tools group.
Select the cell or column that contains the text you want to split.
Select Data > Text to Columns.
In the Convert Text to Columns Wizard, select Delimited > Next.
Select the Delimiters "space" and "other" << put "-" in the text box next to "other" > Next.
Slect the location where you want that data and click finish.
Note: by this way you will end up with double bracket at the end that you can fix with replace function. Selecd your data and click find and replace. Put )) in find box and ) in replace window, click replace all.
Formula:
Assuming your data is in cell A1
Hello - (Whats Up (HowAreYou))
= RIGHT(SUBSTITUTE(A1, "))", ")", 1), LEN(SUBSTITUTE(A1, "))", ")", 1)) - SEARCH(" - ", SUBSTITUTE(A1, "))", ")", 1))
I have time entries of the form:
12:45:55:346 (hh:mm:ss:mss)
And I want to convert it to the form:
12:45:55,346 (hh:mm:ss,mss)
How shall I proceed, please?
You can use the SUBSTITUTE function and specify the 4th parameter:
With input in A1:
=SUBSTITUTE(A1,":",",",3)
With data in A1, in B1 enter:
=LEFT(A1,LEN(A1)-4) & "," & RIGHT(A1,3)
This formula will do the trick:
=REPLACE(A1, 9, 1, ",")
Although this is not something I'd exactly recommend and is likely to
mess up your formatting.
If you truly insist on using this formatting, then keep the original data in a hidden column and do all the calculations with it. The data in this format should just be used to display the current / final result(s).
I have a SUMIFS formula like this:
=SUM(SUMIFS(DATA!A1: A5000", .. others conditions .., DATA!R1:R5000,"{<=2017/06/05"," "}) this works great, but we need
to replace the date with a cell reference.
Something like this: "{<=E12"," "}.
We can't change SUMIFS since this is not allowed by the client.
Try this, Concat the text with cell using &
=SUM(SUMIFS(DATA!A1:Z5000", ... , DATA!R1:R5000,"{<=" & E12 ," "})
=SUMPRODUCT(SUMIFS(DATA!A1:A5000,DATA!R1:R5000,CHOOSE({1,2},"<="&E12," ")))
Regards
I've a huge data in excel file.
For eg: say i've a word like paul son,i've to make it as paulson.
input:paul son
output:paulson.
In some cells ,i've data like mic-li,when this type of words come,it should not replace any thing,it should only remove spaces in between words.
Suppose the data is in the B column, write in the C column the formula:
=SUBSTITUTE(B1," ","")
Copy&Paste the formula in the whole C column.
edit: using commas or semicolons as parameters separator depends on your regional settings (I have to use the semicolons). This is weird I think. Thanks to #tocallaghan and #pablete for pointing this out.
It is SUBSTITUTE(B1," ",""), not REPLACE(xx;xx;xx).
Steps (1) Just Select your range, rows or column or array ,
(2) Press ctrl+H , (3 a) then in the find type a space
(3 b) in the replace do not enter anything,
(4)then just click on replace all.....
you are done.
Just wanted to add on to vulkanino's answer... now 10 years later ha. This is what I was looking for maybe someone else is too. You can also build on multiple =SUBSTITUTE() functions.
Here is what I used to format a list of names for Active Directory accounts. B2 is where the name would go. I wanted to change the space between the First name and last to a period and omit any hyphens from names.
=SUBSTITUTE(SUBSTITUTE(B2, " ", "."), "-", "")
For example the line above would look like this:
First Last-Name => First.LastName
, "-", "")
This part removes the hyphen.
(B2, " ", ".")
This part selects the cell to modify and changes empty space to a period.
=SUBSTITUTE(SUBSTITUTE(...)...)
I used two substitute functions one inside the other.