View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
NewToVB NewToVB is offline
external usenet poster
 
Posts: 48
Default vlookup question

I'm using Visual Studio 2005 (Visual Basic) to open up an excel sheet and do
some vlookups. I'm not actually inputting the formula but I'm doing the
vlookup through VS. When I do a vlookup to return a column that contains a
number with 2 digits after the decimal it will not return the numbers after
the decimal. It just rounds the number and then returns .00 after the
decimal. For example..if I am trying to retun 54.75 it returns 55.00. Any
idea how to fix this? Thanks in advance! Here's what my code looks like:

app.WorksheetFunction.VLookup(app.Range("A" & lastRow + 1).Value,
app2.Range("A3:FD" & lastrow6).Value, 46, False)