VLOOKUP SUM with blank values

tcarwardine

New Member
Joined
Jul 13, 2016
Messages
26
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi
I am building a school timetable and I am trying to SUM the weight of different subject choices based on a separate lookup table.

Student must have a weight of at least 3 but this can be a mix of any courses. There are four blocks and not every block will be filled by every pupil.

When I use VLOOKUP to SUM their block choices it is returning N/A because of the blank block columns.

The formula i tried is:
=VLOOKUP([@A],WEIGHT[#All],3,FALSE)+
VLOOKUP([@B],WEIGHT[#All],3,FALSE)+
VLOOKUP([@C],WEIGHT[#All],3FALSE)+
VLOOKUP([@D],WEIGHT[#All],3,FALSE)

This is my table 'OPTIONS'. The column I am trying to calculate is BLOCKED WEIGHT.
In this instance the top pupil should return 3. The second pupil 2. The third 2. And the fourth 2.
1705484123057.png


This is my lookup table 'WEIGHT'
1705484338444.png


Many thanks
 

Attachments

  • 1705483845307.png
    1705483845307.png
    21.7 KB · Views: 13

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
apology, miss read your question
 
Last edited:
Upvote 0
you can check if the cell is empty then proceed like this

=if(isblank(([@A]),0,VLOOKUP([@A],WEIGHT[#All],3,FALSE)) etc
 
Upvote 1
Solution

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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