Formula help

chris9277

Board Regular
Joined
Apr 9, 2009
Messages
154
Office Version
  1. 365
Platform
  1. Windows
  2. Web
Hello there,

I have a formula:

=IF($F$3="","",VLOOKUP($F$3,'DAY & NIGHT TEAM'!$A$5:$H$370,5,FALSE))

the problem I have is if the requirement is false it returns 0 what I would like it to do is return the word "OFF".

Can this be done? & if so I've got the feeling it will be something simple.

Kind regards,

Chris
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Hello there,

I have a formula:

=IF($F$3="","",VLOOKUP($F$3,'DAY & NIGHT TEAM'!$A$5:$H$370,5,FALSE))

the problem I have is if the requirement is false it returns 0 what I would like it to do is return the word "OFF".

Can this be done? & if so I've got the feeling it will be something simple.

Kind regards,

Chris
Do you mean the value being returned by the VLOOKUP might be 0 and you would rather it be "OFF"?
 
Upvote 0
Sorry, not familier with custom formatting


Select the formula cell.
Activate Format | Cells (or select the option Format Cells after a right click).
Choose Custom.
Enter in the white box for Type:

[=0]"OFF";General

Otherwise, you'll need something like:
Code:
=IF($F$3="","",
   IF(VLOOKUP($F$3,'DAY & NIGHT TEAM'!$A$5:$H$370,5,0)="",
      "OFF",VLOOKUP($F$3,'DAY & NIGHT TEAM'!$A$5:$H$370,5,0)))
 
Upvote 0
Yes that's the one.
Ok, try this...

=IF($F$3="","",IF(VLOOKUP($F$3,'DAY & NIGHT TEAM'!$A$5:$H$370,5,0)="","OFF",VLOOKUP($F$3,'DAY & NIGHT TEAM'!$A$5:$H$370,5,0)))

Note that if you use a custom format the TRUE CELL VALUE will still be 0 but the cell will display OFF. So, if you need to do further calculations on this data like counting how many instances of OFF there are that could cause some unnecessary problems.
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

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