I have a code (see below) that extracts a specific string from column A. The problem with this is that it outputs the string in date format. In this case, the output should be "3/5". When I execute the code, it outputs as a date "5-Mar". I tried to change the format of the cell to "Fraction" but the problem is that instead of outputting "3/5", it results to a "0.6" value although it is displayed as "3/5". When I changed the format to "Text", instead of outputting a value, the resulting formula is displayed. I need the output to be displayed as "3/5" (text)
Any ideas?
Any ideas?
Code:
With ActiveSheet.Range("A2", Cells(Rows.Count, "A").End(xlUp)).Offset(0, 7)
.Formula = "=IF(ISERROR(LEFT(MID(RC1,FIND(""<""&R1C&"">"",RC1)+6,LEN(RC1)),FIND(""</""&R1C&"">"",MID(RC1,FIND(""<""&R1C&"">"",RC1)+6,LEN(RC1)))-1)),"""",LEFT(MID(RC1,FIND(""<""&R1C&"">"",RC1)+6,LEN(RC1)),FIND(""</""&R1C&"">"",MID(RC1,FIND(""<""&R1C&"">"",RC1)+6,LEN(RC1)))-1))"
.Value = .Value
End With