Hi,
Is there a way to make the data appear in values and not in formula?
i am aware of .value = .value. But what i am trying to do if there is an alternative to FormulaR1C1 ?Range("D26").FormulaR1C1 = "=VLOOKUP(R[-24]C,DATA!C1:C50,26,0)"
Hi,
Is there a way to make the data appear in values and not in formula?
i am aware of .value = .value. But what i am trying to do if there is an alternative to FormulaR1C1 ?Range("D26").FormulaR1C1 = "=VLOOKUP(R[-24]C,DATA!C1:C50,26,0)"
Keep the Forum clean :
1. Use [ code ] code tags [ /code ]. It keeps posts clean, easy-to-read, and maintains VBA formatting.
2. Show appreciation to those who have helped you by clicking * Add Reputation below their posts.
3. If you are happy with a solution to your problem, mark the thread as [SOLVED] using the tools at the top.
Something like this...Untested...Not sure what the lookup criteria is...
Range("D26") = Application.WorksheetFunction.VLookup("whattolookup", Sheets("DATA").Range("C1:C50"), 1, False)
Good Luck
I don't presume to know what I am doing, however, just like you, I too started somewhere...
One-day, One-problem at a time!!!
If you feel I have helped, please click on the star to left of post [Add Reputation]
Also....add a comment if you like!!!!
And remember...Mark Thread as Solved.
Excel Forum Rocks!!!
Thank you sintek.
I tried, but am getting error msg as Runtime error 1004, Unable to get the vlookup property of the worksheetfunction class.
whattolookup = Sheets("MAIN").Range("D2").Value Sheets("MAIN").Range("D7") = Application.WorksheetFunction.VLookup("whattolookup", Sheets("DATA").Range("C1:C50"), 2, False)
Last edited by shiva_reshs; 07-23-2019 at 05:54 AM.
remove quotation marks"whattolookup"
And this range not correct....2nd column in only 1 col range...Range("C1:C50"), 2
Last edited by sintek; 07-23-2019 at 05:59 AM.
Did. Still same error msg.
Upload your sample file...
Thank you Sintek and Marc for helping out. Solved.
Glad you got it sorted...
Long way you get not figure out would have been...
Sub Vlookup() Range("D26") = Application.WorksheetFunction.Vlookup(Sheets("Data").Range("D2").Value, Sheets("Data").Range("A:Z"), 26, False) End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks