Incorporating truncation within VLOOKUP function

EchoDelta

New member
Joined
Feb 28, 2015
Messages
8
Reaction score
0
Points
0
Excel Version(s)
2013
Is it possible to incorporate truncation (TRUNC or INT) within VLOOKUP function? I have a formula and it works just fine except the result is not always a whole number. I have another formula which looks at this result but requires a whole number.

Formula is:

= VLOOKUP(J2,'[Handicap.xlsm]'!$A$6:$F$209,6,)

Thanks,
Ed
 
Just use

=INT(VLOOKUP(J2,'[Handicap.xlsm]'!$A$6:$F$209,6,))
 
I just realized that I made a mistake. Your response was exactly what I asked for. What I really need is to have the number rounded to the nearest whole number because some of the numbers need to be rounded up. I have tried to replace INT with ROUND but get an error message “Your formula contains an error.” I believe it is looking for the number of decimal places after the whole number, which I want to be zero. I have tried putting “0” in multiple places within the formula, each resulting in the same error message. Hopefully this can be achieved.

Thanks for any advice.

Ed
 
This should work

=ROUND(VLOOKUP(J2,'[Handicap.xlsm]'!$A$6:$F$209,6,),0)
 
Thank you kind sir.

When cell J2 was blank, I was getting the dreaded “#N/A” error so I added a test for J2 being blank and ended up with the following:

=IF($J2="","",(ROUND(VLOOKUP($J2,'[Handicap.xlsm]'!$A$6:$F$209,6,),0)))

Thanks again.

Ed
 
Back
Top