Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default How do I write a VLOOKUP function that returns 0's, not neg vals?

I need to write a VLOOKUP function that will return a value of "0" if it
finds the number for which it had searched is negative. My thought is to use
an IF logic function together with the VLOOKUP, but I just can't seem to
successfully weave the two together.

Any help would be much appreciated. Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default How do I write a VLOOKUP function that returns 0's, not neg vals?

=MAX(0,vlookup_formula)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"dbsavoy" wrote in message
...
I need to write a VLOOKUP function that will return a value of "0" if it
finds the number for which it had searched is negative. My thought is to

use
an IF logic function together with the VLOOKUP, but I just can't seem to
successfully weave the two together.

Any help would be much appreciated. Thanks!



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default How do I write a VLOOKUP function that returns 0's, not neg va

Thanks Bob, this seems to work standalone, but I still can't figure out how
to integrate it with the formula I'm using:
=IF(ISNA(VLOOKUP($A10,Pg2!$A$2:$M$453,Y$3,FALSE)), "",VLOOKUP($A10,'NA
Pg2'!$A$2:$M$453,Y$3,FALSE))

I must be a bit slow on the uptake. Where in this formula can I specify
that neg. values should be returned as Zero?

"Bob Phillips" wrote:

=MAX(0,vlookup_formula)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"dbsavoy" wrote in message
...
I need to write a VLOOKUP function that will return a value of "0" if it
finds the number for which it had searched is negative. My thought is to

use
an IF logic function together with the VLOOKUP, but I just can't seem to
successfully weave the two together.

Any help would be much appreciated. Thanks!




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default How do I write a VLOOKUP function that returns 0's, not neg va

I think this is what you need

=IF(ISNA(VLOOKUP($A10,Pg2!$A$2:$M$453,Y$3,FALSE)), "",
MAX(0,VLOOKUP($A10,'NA Pg2'!$A$2:$M$453,Y$3,FALSE)))


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"dbsavoy" wrote in message
...
Thanks Bob, this seems to work standalone, but I still can't figure out

how
to integrate it with the formula I'm using:
=IF(ISNA(VLOOKUP($A10,Pg2!$A$2:$M$453,Y$3,FALSE)), "",VLOOKUP($A10,'NA
Pg2'!$A$2:$M$453,Y$3,FALSE))

I must be a bit slow on the uptake. Where in this formula can I specify
that neg. values should be returned as Zero?

"Bob Phillips" wrote:

=MAX(0,vlookup_formula)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"dbsavoy" wrote in message
...
I need to write a VLOOKUP function that will return a value of "0" if

it
finds the number for which it had searched is negative. My thought is

to
use
an IF logic function together with the VLOOKUP, but I just can't seem

to
successfully weave the two together.

Any help would be much appreciated. Thanks!






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default How do I write a VLOOKUP function that returns 0's, not neg va

That did it! Bob, you've made my day. :-)

Thx!

"Bob Phillips" wrote:

I think this is what you need

=IF(ISNA(VLOOKUP($A10,Pg2!$A$2:$M$453,Y$3,FALSE)), "",
MAX(0,VLOOKUP($A10,'NA Pg2'!$A$2:$M$453,Y$3,FALSE)))


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"dbsavoy" wrote in message
...
Thanks Bob, this seems to work standalone, but I still can't figure out

how
to integrate it with the formula I'm using:
=IF(ISNA(VLOOKUP($A10,Pg2!$A$2:$M$453,Y$3,FALSE)), "",VLOOKUP($A10,'NA
Pg2'!$A$2:$M$453,Y$3,FALSE))

I must be a bit slow on the uptake. Where in this formula can I specify
that neg. values should be returned as Zero?

"Bob Phillips" wrote:

=MAX(0,vlookup_formula)

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"dbsavoy" wrote in message
...
I need to write a VLOOKUP function that will return a value of "0" if

it
finds the number for which it had searched is negative. My thought is

to
use
an IF logic function together with the VLOOKUP, but I just can't seem

to
successfully weave the two together.

Any help would be much appreciated. Thanks!






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vlookup Function Help Needed jeffc Excel Worksheet Functions 2 August 14th 06 12:32 PM
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
Vlookup Function Arguments are correct but nothing in cell Tom Excel Worksheet Functions 12 April 25th 06 12:41 AM
Function that Returns address of that cell? RayWolfDog Excel Worksheet Functions 2 February 15th 06 04:54 PM
Excel option to store trendline's coefficients in cells for use Miguel Saldana Charts and Charting in Excel 9 June 20th 05 08:45 PM


All times are GMT +1. The time now is 07:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"