Hello,
I've searched here and there and see that a similar question has been raised many times, however was still unable to come up with a solution for myself
This is the thing:
I have data in Column A (Range A1:A15).
In Column B (Range B1:B1 = Cell B1) I have the following formula: "=MID(LEFT(A1,FIND(">",A1)-1),FIND("<",A1)+1,LEN(A1))" which works fine and is returning me value in Cell B1, based on Cell A1.
I want a simple line VBA code, which autofill till the last row with data (in this case Cell A15) within Cell B2 till Cell B15.
And since the data in Column A may vary let's say I have not 15, but 50, 60, or 100 rows, this code to be suitable respectively to autofill till B50, B60, or B100.
P.S. I've found several possible solutions, which worked for other users with similar problems, however all of them were kind of "code within the code = first they define the range A as dynamic, but for this they use a separate code. Since I am not very familiar with VBA, is there more simple way to do that? I mean just to enter the code as one row within my code ...
A 'solution' like the below one offered for me is not really working for a newbie like me
Sub
Dim last_row As Long
last_row = Cells(Rows.Count, 2).End(xlUp).Row
Range("B1").Formula = "=MY_FORMULA_HERE"
Range("B1").AutoFill Destination:=Range("B1:B" & last_row)
EndSub
Bookmarks