Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

if functions and vlookups

Forum home » Delegate support and help forum » Microsoft Excel Training and help » IF functions and Vlookups

IF functions and Vlookups

ResolvedVersion 365

Nicole has attended:
Excel Intermediate course

IF functions and Vlookups

My formula is supposed to look up stock figures from two different things and add them together but it is just giving 0 if either of the stocks is 0.

for example one stock is 998 and the other is 0 so the formula gives 0 instead of 998.

the formula is below:

=IFERROR(VLOOKUP($B241,'PO Calcs Pivot'!$A:$V,7,0)+IFERROR(VLOOKUP($C241,'PO Calcs Pivot'!$A:$V,7,0),0),0)

The stock is pulling through on the pivot just not when the look up uses the above formula.

Can anyone please help?

RE: IF functions and Vlookups

Hi Nicole,

Thank you for the forum question.

Try:
=IFERROR(VLOOKUP($B241,'PO Calcs Pivot'!$A:$V,7,0),0)+IFERROR(VLOOKUP($C241,'PO Calcs Pivot'!$A:$V,7,0),0)

If it is not giving you the right result try:

=VLOOKUP($B241,'PO Calcs Pivot'!$A:$V,7,0)+VLOOKUP($C241,'PO Calcs Pivot'!$A:$V,7,0)

If this returns #NA error the Vlookups cannot find the lookup values and you will need to find out why. If the lookup value isn't 100% the same as found in the first column of the table array the Vlookup returns #NA


Kind regards

Jens Bonde
Microsoft Office Specialist Trainer

Tel: 0207 987 3777
STL - https://www.stl-training.co.uk
98%+ recommend us

London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector

Wed 22 Dec 2021: Automatically marked as resolved.

Excel tip:

Wrapping Text in a Cell in an Excel 2010 Workbook

When you have a lot of text you want to put in a particular cell but you can't decrease the font size to fit because the text will then become ineligible, then manually wrap the text in a cell by simply pressing ALT+ENTER.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.