Hi,
pls. how can i convert this formula to vba code?
thx for help=VALUE(LEFT(E10;FIND("/";E10)-1)&MID(E10;FIND("/";E10)+1;20))
Hi,
pls. how can i convert this formula to vba code?
thx for help=VALUE(LEFT(E10;FIND("/";E10)-1)&MID(E10;FIND("/";E10)+1;20))
i tried this, but it doesnt works
[vba]
b = (Left(bunka, InStr(1, "/", bunka) - 1) & Mid(bunka, InStr("/", bunka) + 1, 20))
[/vba]
bunka - is variable to my active cell
i got it
maybe somebody use this info
[VBA]
b = (Left(bunka, InStr(1, bunka, "/") - 1) & Mid(bunka, InStr(1, bunka, "/") + 1, 20))
[/VBA]
I know that you worked out your answer, but out of curiosity, did you think about asking the macro recorder?
[vba]ActiveCell.FormulaR1C1 = _
"=VALUE(LEFT(R[8]C[2],FIND(""/"",R[8]C[2])-1)&MID(R[8]C[2],FIND(""/"",R[8]C[2])+1,20))"[/vba]
Granted it's not as clean, but it will give you exactly what you're after. This is written in R1C1 notation, but you could just as easily convert it to A1 notation.
Hope it helps for future,
Ken Puls, CMA - Microsoft MVP (Excel)
I hate it when my computer does what I tell it to, and not what I want it to.
Learn how to use our KB tags! -||- Ken's Excel Website -||- Ken's Excel Forums -||- My Blog -||- Excel Training Calendar
This is a shameless plug for my new book "RibbonX - Customizing the Office 2007 Ribbon". Find out more about it here!
Help keep VBAX clean! Use the 'Thread Tools' menu to mark your own threads solved!
you right, i will really help for the future. thx a lotOriginally Posted by Ken Puls