Hello,
I would like to create a Macro to auto fill a formula starting in cell A2 and fill down in column A till the last used row of column B. I am still trying to get the hang of VBA...
This is the formula:
-E.D.![]()
= "=RC[5]&"".jpg"""
Hello,
I would like to create a Macro to auto fill a formula starting in cell A2 and fill down in column A till the last used row of column B. I am still trying to get the hang of VBA...
This is the formula:
-E.D.![]()
= "=RC[5]&"".jpg"""
place the below in a module and run it , let us know if it is the result you wish.
![]()
Sub Hulpeloos() For B = 2 To 65000 Dim Bvalue As String Bvalue = Sheets("report").Range("B" & B).Value If Bvalue <> "" Then Sheets("report").Range("A" & B).FormulaR1C1 = "=CONCATENATE(R[0]C[5],"".jpg"")" Else Exit Sub End If Next B End Sub
If solved remember to mark Thread as solved , to mark your thread as Solved select Thread Tools and click Mark thread as Solved.
I can't read the mind of my wife so then I get picture but no sound .... and then I mostly get the idea, same goes here picture your outcome and I get the idea.
Another:
![]()
Sub edebraal() Dim x As Long x = Range("B" & Rows.count).End(3)(2).Row - 1 For Each cell In Range("A2:A" & x) cell.Value = "=" & cell.Offset(, 5).Value & ".jpg" Next cell End Sub
Hulpeloos - This worked great. Is there a way that I can have the value of the formula in the cell instead of just showing it? I thought to just copy paste with the value only option but if it would be added to this it would be great.
John - Thanks for your idea as well it also worked but I get a run-time error '1004' and the cells say #NAME?. The value of the cells is right but there is and "=" sign in front of each of them. Is there a way to remove this from yours that will eliminate this error?
Thanks again for all your help!
Last edited by edebraal; 09-30-2013 at 02:41 PM.
you want it to showor even something else , i'm a bit confused![]()
RJA01WMC1002.jpg or =CONCATENATE(F2;".jpg")
I was able to take John's and just make the adjustment to remove thefrom the report and it worked. Thanks to both of you for your help!![]()
"="
Last edited by edebraal; 10-08-2013 at 06:54 PM. Reason: Figured out the answer!
You're welcome. Glad to help out.
Try the attached.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks