If / Or statement

browns14

New Member
Joined
Feb 8, 2013
Messages
22
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

Any help gratefully received!
Course Name% Complete% Not Complete
1100#N/A
27525
32575
4#N/A100
55050

<tbody>
</tbody>
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
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))
 
Upvote 0

Forum statistics

Threads
1,213,568
Messages
6,114,348
Members
448,570
Latest member
rik81h

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