Thread
:
VBA instead of lookupformula
View Single Post
#
4
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
VBA instead of lookupformula
just use the example I gave you, modified to suit
OR modify this idea to suit. Formula is created,copied down,changed to value
Sub balance()
Set mrng = Range("h8:h" & Range("a65536").End(xlUp).Row)
With mrng
Formula="=IF(A$21=0;"";IF(B6<A$21;"";LOOKUP(A$21; B6;C6)))"
' .Formula = "=h7+d8"
.Formula = .Value
End With
End Sub
--
Don Guillett
SalesAid Software
"Jonsson" wrote in message
...
Hi Don!
Could you please help me understand by convert this formula into VBA:
=IF(A$21=0;"";IF(B6<A$21;"";LOOKUP(A$21;B6;C6)))
Thanks in advance
//Thomas
"Don Guillett" skrev i meddelandet
...
Should help. Just reference the range in the vba or use find & offset
range("a4")=application.vlookup(range("a1"),range( "b2:x100"),2,false)
--
Don Guillett
SalesAid Software
"Jonsson" wrote in message
...
Hi,
Is it possible to do lookup in VBA instead of a formula?
I have a workbook with a huge amount of lookupformulas and therefore
the
size of the workbook is so big that it gets unstabile.
If I write in code, will the size decrease?
If so, can anyone give me a little help in how to do that?
Any help is appreciated!
//Thomas
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]