ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   vlookup question (https://www.excelbanter.com/excel-programming/406776-vlookup-question.html)

NewToVB

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)


All times are GMT +1. The time now is 06:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com