ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Convert Macro ..... (https://www.excelbanter.com/excel-programming/360357-convert-macro.html)

rvillanueva[_8_]

Convert Macro .....
 

Hi i record this macro:

Range("B90").Select
ActiveCell.FormulaR1C1 = "=LEN(RC[-1])"
Range("B91").Select
ActiveCell.FormulaR1C1 = "=MID(R[-1]C[-1],1,RC[-1]-4)"
Range("B92").Select
ActiveCell.FormulaR1C1 = "=LEN(R[-1]C)"
Range("B93").Select
ActiveCell.FormulaR1C1 = "=MID(R[-2]C,22-8,22)"
Range("B93").Select

But i want to convert using Tags, like this
FileN = Worksheets("Datos").Range("A1").Value
Long = "=LEN(FileN)"
A = "=MID(FileN,1,Long - 4)
Long = "=LEN(A)"
FileN = "=MID (FileN,Long-8,Long)

How can i do ??

Thanks


--
rvillanueva
------------------------------------------------------------------------
rvillanueva's Profile: http://www.excelforum.com/member.php...o&userid=28814
View this thread: http://www.excelforum.com/showthread...hreadid=538149


Tom Ogilvy

Convert Macro .....
 
FileN = Worksheets("Datos").Range("A1").Value
Long = LEN(FileN)
A = MID(FileN,1,Long - 4)
Long = LEN(A)
FileN = MID(FileN,Long-8,Long)

--
Regards,
Tom Ogilvy


"rvillanueva" wrote:


Hi i record this macro:

Range("B90").Select
ActiveCell.FormulaR1C1 = "=LEN(RC[-1])"
Range("B91").Select
ActiveCell.FormulaR1C1 = "=MID(R[-1]C[-1],1,RC[-1]-4)"
Range("B92").Select
ActiveCell.FormulaR1C1 = "=LEN(R[-1]C)"
Range("B93").Select
ActiveCell.FormulaR1C1 = "=MID(R[-2]C,22-8,22)"
Range("B93").Select

But i want to convert using Tags, like this
FileN = Worksheets("Datos").Range("A1").Value
Long = "=LEN(FileN)"
A = "=MID(FileN,1,Long - 4)
Long = "=LEN(A)"
FileN = "=MID (FileN,Long-8,Long)

How can i do ??

Thanks


--
rvillanueva
------------------------------------------------------------------------
rvillanueva's Profile: http://www.excelforum.com/member.php...o&userid=28814
View this thread: http://www.excelforum.com/showthread...hreadid=538149



rvillanueva[_9_]

Convert Macro .....
 

Works fine !!!


--
rvillanueva
------------------------------------------------------------------------
rvillanueva's Profile: http://www.excelforum.com/member.php...o&userid=28814
View this thread: http://www.excelforum.com/showthread...hreadid=538149



All times are GMT +1. The time now is 03:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com