# If / Or statement

#### browns14

##### New Member
I have a spreadsheet where data from one tab is used to create a column graph on another

On the tab with the column graph I have a vlookup statement to pull through a completion % of training courses. This is set to return #N/A if the lookup value is 0% so the label does not appear on graphs. This look up is

=IF(VLOOKUP(\$B\$4,TRAINING TAB!\$A:\$K,2,FALSE)=0,NA(),VLOOKUP(\$B\$4,TRAINING TAB!\$A:\$K,2,FALSE))

This works and brings back the correct values. However, the second part of the graph is made up of the difference between course complete and 100% so was a basic formula. I have managed to get this to also include #N/A for zero values by using the formula

=IF(1-D9=0,NA(),1-D9) (Where D9 is the % of course complete).

My problem is that if the value in course complete is #N/A I need course not complete to show 100% e.g

an example of what I need is below:

% complete is the result of the vlookup and % not complete needs to be based on this.

For both columns if the answer is zero I need #N/A

 Course Name % Complete % Not Complete 1 100 #N/A 2 75 25 3 25 75 4 #N/A 100 5 50 50

<tbody>
</tbody>

### Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

#### Mark80

##### Board Regular
I think you just need to nest an if statement inside your current formula. Like this:

=IF(1-D9=0,NA(),if(isna(D9),1,1-D9))

#### browns14

##### New Member
Many thanks - much appreciated

Replies
5
Views
345
Replies
3
Views
1K
Replies
1
Views
848
Replies
1
Views
572
Replies
14
Views
605

1,190,677
Messages
5,982,216
Members
439,769
Latest member
trungminh2802

### 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.

### Which adblocker are you using?

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

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