How to insert a blank value with a function

MJ

New Member
Joined
Feb 24, 2002
Messages
6
Hi all,

I have a row with numbers that are the result of a VLOOKUP function, and I want cells to be blank (empty) when the source of the lookup is blank. The cells must be blank, not 0, because the results are plotted in a chart where blank values are interpolated.

The current formula is:

=IF(ISBLANK(E2),"",VLOOKUP(E2,R2:S12,2,FALSE))

This results in "" being interpreted as 0 in the chart :(. What do I use in stead of ""?

Thanks!
This message was edited by MJ on 2002-02-25 20:39
This message was edited by MJ on 2002-02-25 20:40
 
If I understand your intent correctly (I was/am quite unsure about MJ's), wouldn't just

=VLOOKUP(E2,R2:S12,2,FALSE)

suffice?

Not necessarily... what if R2:R12 contains a 0?
[/quote]

There's no 0's in R2:S12; it is a fixed vocabulary that is then translated to a fixed list of numbers starting at 1.0.

The simplest =VLOOKUP thus suffices! I didn't realize #N/A let's the chart interpolate that value without explicetly being told to, this is way better than my previous hacks. I thin kI discarded my first attempt with a simple VLOOKUP because I didn't like the look of all the #N/A's in the set and assumed it would cause errors in the chart. But as the column is hidden anyway, this is actually absolutely perfect.

Thanks!
 
Upvote 0

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
MJ,

Quel denoument!

I didn't dare to think that you just wanted to suppress 0-values from your charts. Mark has gone straight to that conclusion. Looks like rightly so.

Aladin

On 2002-02-26 07:58, Anonymous wrote:
If I understand your intent correctly (I was/am quite unsure about MJ's), wouldn't just

=VLOOKUP(E2,R2:S12,2,FALSE)

suffice?

Not necessarily... what if R2:R12 contains a 0?

There's no 0's in R2:S12; it is a fixed vocabulary that is then translated to a fixed list of numbers starting at 1.0.

The simplest =VLOOKUP thus suffices! I didn't realize #N/A let's the chart interpolate that value without explicetly being told to, this is way better than my previous hacks. I thin kI discarded my first attempt with a simple VLOOKUP because I didn't like the look of all the #N/A's in the set and assumed it would cause errors in the chart. But as the column is hidden anyway, this is actually absolutely perfect.

Thanks!
[/quote]
 
Upvote 0
F16= Start date
G16= End Date

=NETWORKDAYS(F16,IF(ISBLANK(G16),TODAY(),G16))

If you end date is blank (they are still working for you) then it will give the number of days that they have worked between their start day and the current date.
 
Upvote 0
Welcome to the Board!

F16= Start date
G16= End Date

=NETWORKDAYS(F16,IF(ISBLANK(G16),TODAY(),G16))

If you end date is blank (they are still working for you) then it will give the number of days that they have worked between their start day and the current date.

Did you mean to reply to this thread? If you PM me the URL of the thread you wanted to reply to, I'll move your response.
 
Upvote 0

Forum statistics

Threads
1,214,386
Messages
6,119,220
Members
448,876
Latest member
Solitario

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