Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
How do I change the following as a vb code???
=VLOOKUP(AZ4,Sheet3!A:B,2,0) -- Tdp |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Try this:
x = Application.WorksheetFunction.VLookup(Range("AZ4") , Sheet3.Range("A:B"), 2, 0) Regards, Per "Tdp" skrev i meddelelsen ... How do I change the following as a vb code??? =VLOOKUP(AZ4,Sheet3!A:B,2,0) -- Tdp |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Per that seems to work fine
Many thanks -- Tdp "Per Jessen" wrote: Try this: x = Application.WorksheetFunction.VLookup(Range("AZ4") , Sheet3.Range("A:B"), 2, 0) Regards, Per "Tdp" skrev i meddelelsen ... How do I change the following as a vb code??? =VLOOKUP(AZ4,Sheet3!A:B,2,0) -- Tdp |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Just one more question Per
With this code how do I include if the cell is empty then show zero? -- Tdp "Tdp" wrote: Thanks Per that seems to work fine Many thanks -- Tdp "Per Jessen" wrote: Try this: x = Application.WorksheetFunction.VLookup(Range("AZ4") , Sheet3.Range("A:B"), 2, 0) Regards, Per "Tdp" skrev i meddelelsen ... How do I change the following as a vb code??? =VLOOKUP(AZ4,Sheet3!A:B,2,0) -- Tdp |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi Tdp
As you don't write which cell could be empty I assume that it's AZ4. If Range("AZ4").Value = "" Then x = 0 Else x = Application.WorksheetFunction.VLookup(Range("AZ4") , Sheet3.Range("A:B"), 2, 0) End If Regards, Per "Tdp" skrev i meddelelsen ... Just one more question Per With this code how do I include if the cell is empty then show zero? -- Tdp "Tdp" wrote: Thanks Per that seems to work fine Many thanks -- Tdp "Per Jessen" wrote: Try this: x = Application.WorksheetFunction.VLookup(Range("AZ4") , Sheet3.Range("A:B"), 2, 0) Regards, Per "Tdp" skrev i meddelelsen ... How do I change the following as a vb code??? =VLOOKUP(AZ4,Sheet3!A:B,2,0) -- Tdp |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sorry about that.......I forgot.
It works well now. I only made one change to it If Range("AZ14").Value = "" Then Range("BB14").Value = "" Else Range("BB14").Value = Application.WorksheetFunction.VLookup(Range("AZ14" ), Sheet3.Range("A:B"), 2, 0) End If Many thanks -- Tdp "Per Jessen" wrote: Hi Tdp As you don't write which cell could be empty I assume that it's AZ4. If Range("AZ4").Value = "" Then x = 0 Else x = Application.WorksheetFunction.VLookup(Range("AZ4") , Sheet3.Range("A:B"), 2, 0) End If Regards, Per "Tdp" skrev i meddelelsen ... Just one more question Per With this code how do I include if the cell is empty then show zero? -- Tdp "Tdp" wrote: Thanks Per that seems to work fine Many thanks -- Tdp "Per Jessen" wrote: Try this: x = Application.WorksheetFunction.VLookup(Range("AZ4") , Sheet3.Range("A:B"), 2, 0) Regards, Per "Tdp" skrev i meddelelsen ... How do I change the following as a vb code??? =VLOOKUP(AZ4,Sheet3!A:B,2,0) -- Tdp |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Code required for VLookup returning #NA | Excel Discussion (Misc queries) | |||
Using VLOOKUP in VBA code | Excel Worksheet Functions | |||
VLOOKUP code needed please | Excel Worksheet Functions | |||
VLOOKUP for Zip Code Ranges | Excel Worksheet Functions | |||
how to use a VLOOKUP function in a VBA code? | New Users to Excel |