VLOOKUP working on the calculation rather than the number shown

Palacemad

New Member
Joined
May 19, 2019
Messages
42
HI, I am sure this is a very quick question/answer,

In one cell(D38) I have a SUMIFS formula, the answer it is returning is 0.415. This number is actually a calculation of months in decimals. In the next cell (E38) I have a vlookup to return this figure in months. Cell D38 is rounded to 2 decimal places and is showing 0.42. The vlookup is still producing a returning value of 4 months, even though it should be 5 months. I have even tried using ROUNDUP within the VLOOKUP and this is still not having an impact.

I assumed the reason is due to the VLOOUP working on the actual calculation figure of 0.415, rather than the figure that is showing. However, I am unsure why it is not changing when the ROUNDUP formula is being used.

Any suggestions will be appreciated!

Thank you
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
is your vlookup() similar to this?


Book1
ABCDEF
10.4150.4220.411
20.422
30.433
40.444
50.455
Sheet2
Cell Formulas
RangeFormula
B1=ROUND(A1,2)
C1=VLOOKUP(B1,E1:F5,2,0)
 
Upvote 0
To clarify too, the formula in E38 when using ROUNDUP is:

=IF(COUNTBLANK(C38)=1,"",ROUNDUP(VLOOKUP(C38,DecimalToAge,2),0)&" months")

I am fairly certain that is written correctly, happy to proved wrong though!
 
Upvote 0
looks like the bracket is in the wrong place, try

=IF(COUNTBLANK(C38)=1,"",ROUNDUP(VLOOKUP(C38,DecimalToAge,2,0)&" months"))
 
Upvote 0
Apologies, I am confusing issues here with writing the wrong cell references down.

C38D38
Calculation returning the figure 0.415 but showing 0.42 as rounded to 2dp by formatting the cell properties

=IF(COUNTBLANK(C38)=1,"",ROUNDUP(VLOOKUP(C38,DecimalToAge,2),2)&" months")

<tbody>
</tbody>
 
Upvote 0
Alan, I get a response of I have entered too few arguments for this section, the word 'months' at the end of the formula is then highlighted
 
Upvote 0
my bad, try again

=IF(ISBLANK(C38),"",ROUNDUP(VLOOKUP(C38,DecimalToAge,2,0),2)&" months")
 
Upvote 0
Thank you, but it is now returning #N/A

Sorry! I did copy and paste your formula rather than typing it to make sure it is correct.
 
Upvote 0
this works for me


Book1
ABCDE
10.4150.42 months0.411
20.42 months2
30.433
40.444
50.455
6
72 months
Sheet2
Cell Formulas
RangeFormula
B1=ROUND(A1,2)&" months"
E7=IF(ISBLANK(B1),"",ROUNDUP(VLOOKUP(B1,D1:E5,2,0),2)&" months")
 
Upvote 0
show us what's in C38 and the table DecimalToAge
 
Upvote 0

Forum statistics

Threads
1,213,504
Messages
6,114,020
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top