Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Teri
 
Posts: n/a
Default Excluding cells with no value in calculation

I have to calculate a value based on a VLOOKUP, but one of the cells (outside
the VLOOKUP table) may be blank. If that cell is blank, I want zero for an
answer. My current formula is:
=(VLOOKUP(E2,$J$2:$L$6,3)+IF(ISNUMBER(C2),0.5,0))

Cell E2 is a percentage
Cell C2 is a quote number

J K
L
GP Greater Than or Equal To€¦ But Less Than€¦ Points
-100% 0% 0.0
0% 21% 0.5
21% 31% 1.0
31% 40% 1.5
40% 101% 2.0

  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

One way

=(C2<"")*(VLOOKUP(E2,$J$2:$L$6,3,0)+IF(ISNUMBER(C 2),0.5,0))


Regards,

Peo Sjoblom

"Teri" wrote:

I have to calculate a value based on a VLOOKUP, but one of the cells (outside
the VLOOKUP table) may be blank. If that cell is blank, I want zero for an
answer. My current formula is:
=(VLOOKUP(E2,$J$2:$L$6,3)+IF(ISNUMBER(C2),0.5,0))

Cell E2 is a percentage
Cell C2 is a quote number

J K
L
GP Greater Than or Equal To€¦ But Less Than€¦ Points
-100% 0% 0.0
0% 21% 0.5
21% 31% 1.0
31% 40% 1.5
40% 101% 2.0

  #3   Report Post  
Teri
 
Posts: n/a
Default

I still get #N/A as a result.

"Peo Sjoblom" wrote:

One way

=(C2<"")*(VLOOKUP(E2,$J$2:$L$6,3,0)+IF(ISNUMBER(C 2),0.5,0))


Regards,

Peo Sjoblom

"Teri" wrote:

I have to calculate a value based on a VLOOKUP, but one of the cells (outside
the VLOOKUP table) may be blank. If that cell is blank, I want zero for an
answer. My current formula is:
=(VLOOKUP(E2,$J$2:$L$6,3)+IF(ISNUMBER(C2),0.5,0))

Cell E2 is a percentage
Cell C2 is a quote number

J K
L
GP Greater Than or Equal To€¦ But Less Than€¦ Points
-100% 0% 0.0
0% 21% 0.5
21% 31% 1.0
31% 40% 1.5
40% 101% 2.0

  #4   Report Post  
Harlan Grove
 
Posts: n/a
Default

Teri wrote...
I still get #N/A as a result.

"Peo Sjoblom" wrote:

....
=(C2<"")*(VLOOKUP(E2,$J$2:$L$6,3,0)+IF(ISNUMBER (C2),0.5,0))

....
"Teri" wrote:
I have to calculate a value based on a VLOOKUP, but one of the cells

(outside
the VLOOKUP table) may be blank. If that cell is blank, I want zero

for an
answer. My current formula is:
=(VLOOKUP(E2,$J$2:$L$6,3)+IF(ISNUMBER(C2),0.5,0 ))

....
________J_______ ________K_______ __L__
GP Greater Than But Less Than... Points
or Equal To...
-100% 0% 0.0
0% 21% 0.5
21% 31% 1.0
31% 40% 1.5
40% 101% 2.0


Peo may have erred by using a 4th argument to VLOOKUP. Given the table
above, it's unlikely you want exact matching. Try

=IF(C2="","",VLOOKUP(E2,$J$2:$L$6,3)+ISNUMBER(C2), 0.5,0))

  #5   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

I misunderstood, I thought that C2 was empty, so you just want to get rid of
the N/A error from the VLOOKUP
because the numeric value is not within the range,

IF(ISNA(VLOOKUP(E2,$J$2:$L$6,3)),0,VLOOKUP(E2,$J$2 :$L$6,3)+IF(ISNUMBER(C2),0.5,0))

Regards,

Peo Sjoblom

"Teri" wrote:

I still get #N/A as a result.

"Peo Sjoblom" wrote:

One way

=(C2<"")*(VLOOKUP(E2,$J$2:$L$6,3,0)+IF(ISNUMBER(C 2),0.5,0))


Regards,

Peo Sjoblom

"Teri" wrote:

I have to calculate a value based on a VLOOKUP, but one of the cells (outside
the VLOOKUP table) may be blank. If that cell is blank, I want zero for an
answer. My current formula is:
=(VLOOKUP(E2,$J$2:$L$6,3)+IF(ISNUMBER(C2),0.5,0))

Cell E2 is a percentage
Cell C2 is a quote number

J K
L
GP Greater Than or Equal To€¦ But Less Than€¦ Points
-100% 0% 0.0
0% 21% 0.5
21% 31% 1.0
31% 40% 1.5
40% 101% 2.0



  #6   Report Post  
Teri
 
Posts: n/a
Default

Now I'm getting .5 in the cell even when there's nothing in the other cells.
This is so frustrating. Can you figure it out?

"Peo Sjoblom" wrote:

I misunderstood, I thought that C2 was empty, so you just want to get rid of
the N/A error from the VLOOKUP
because the numeric value is not within the range,

IF(ISNA(VLOOKUP(E2,$J$2:$L$6,3)),0,VLOOKUP(E2,$J$2 :$L$6,3)+IF(ISNUMBER(C2),0.5,0))

Regards,

Peo Sjoblom

"Teri" wrote:

I still get #N/A as a result.

"Peo Sjoblom" wrote:

One way

=(C2<"")*(VLOOKUP(E2,$J$2:$L$6,3,0)+IF(ISNUMBER(C 2),0.5,0))


Regards,

Peo Sjoblom

"Teri" wrote:

I have to calculate a value based on a VLOOKUP, but one of the cells (outside
the VLOOKUP table) may be blank. If that cell is blank, I want zero for an
answer. My current formula is:
=(VLOOKUP(E2,$J$2:$L$6,3)+IF(ISNUMBER(C2),0.5,0))

Cell E2 is a percentage
Cell C2 is a quote number

J K
L
GP Greater Than or Equal To€¦ But Less Than€¦ Points
-100% 0% 0.0
0% 21% 0.5
21% 31% 1.0
31% 40% 1.5
40% 101% 2.0

  #7   Report Post  
Teri
 
Posts: n/a
Default

I copied this right into my spreadsheet and got an error message. Is there a
( missing somewhere?

"Harlan Grove" wrote:

Teri wrote...
I still get #N/A as a result.

"Peo Sjoblom" wrote:

....
=(C2<"")*(VLOOKUP(E2,$J$2:$L$6,3,0)+IF(ISNUMBER (C2),0.5,0))

....
"Teri" wrote:
I have to calculate a value based on a VLOOKUP, but one of the cells

(outside
the VLOOKUP table) may be blank. If that cell is blank, I want zero

for an
answer. My current formula is:
=(VLOOKUP(E2,$J$2:$L$6,3)+IF(ISNUMBER(C2),0.5,0 ))

....
________J_______ ________K_______ __L__
GP Greater Than But Less Than... Points
or Equal To...
-100% 0% 0.0
0% 21% 0.5
21% 31% 1.0
31% 40% 1.5
40% 101% 2.0


Peo may have erred by using a 4th argument to VLOOKUP. Given the table
above, it's unlikely you want exact matching. Try

=IF(C2="","",VLOOKUP(E2,$J$2:$L$6,3)+ISNUMBER(C2), 0.5,0))


  #8   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

Which cell is it that can be blank, if it is C2 then you can use my first
formula after removing ,0 in the VLOOKUP formula, if you want to test against
both C2 and an error from the VLOOKUP you can use


=IF(OR(C2="",ISNA(VLOOKUP(E2,$J$2:$L$6,3))),0,VLOO KUP(E2,$J$2:$L$6,3)+IF(ISNUMBER(C2),0.5,0))




Regards,

Peo Sjoblom
"Teri" wrote:

Now I'm getting .5 in the cell even when there's nothing in the other cells.
This is so frustrating. Can you figure it out?

"Peo Sjoblom" wrote:

I misunderstood, I thought that C2 was empty, so you just want to get rid of
the N/A error from the VLOOKUP
because the numeric value is not within the range,

IF(ISNA(VLOOKUP(E2,$J$2:$L$6,3)),0,VLOOKUP(E2,$J$2 :$L$6,3)+IF(ISNUMBER(C2),0.5,0))

Regards,

Peo Sjoblom

"Teri" wrote:

I still get #N/A as a result.

"Peo Sjoblom" wrote:

One way

=(C2<"")*(VLOOKUP(E2,$J$2:$L$6,3,0)+IF(ISNUMBER(C 2),0.5,0))


Regards,

Peo Sjoblom

"Teri" wrote:

I have to calculate a value based on a VLOOKUP, but one of the cells (outside
the VLOOKUP table) may be blank. If that cell is blank, I want zero for an
answer. My current formula is:
=(VLOOKUP(E2,$J$2:$L$6,3)+IF(ISNUMBER(C2),0.5,0))

Cell E2 is a percentage
Cell C2 is a quote number

J K
L
GP Greater Than or Equal To€¦ But Less Than€¦ Points
-100% 0% 0.0
0% 21% 0.5
21% 31% 1.0
31% 40% 1.5
40% 101% 2.0

  #9   Report Post  
Teri
 
Posts: n/a
Default

FANTASTIC! Thank you SO MUCH for your help!

"Peo Sjoblom" wrote:

Which cell is it that can be blank, if it is C2 then you can use my first
formula after removing ,0 in the VLOOKUP formula, if you want to test against
both C2 and an error from the VLOOKUP you can use


=IF(OR(C2="",ISNA(VLOOKUP(E2,$J$2:$L$6,3))),0,VLOO KUP(E2,$J$2:$L$6,3)+IF(ISNUMBER(C2),0.5,0))




Regards,

Peo Sjoblom
"Teri" wrote:

Now I'm getting .5 in the cell even when there's nothing in the other cells.
This is so frustrating. Can you figure it out?

"Peo Sjoblom" wrote:

I misunderstood, I thought that C2 was empty, so you just want to get rid of
the N/A error from the VLOOKUP
because the numeric value is not within the range,

IF(ISNA(VLOOKUP(E2,$J$2:$L$6,3)),0,VLOOKUP(E2,$J$2 :$L$6,3)+IF(ISNUMBER(C2),0.5,0))

Regards,

Peo Sjoblom

"Teri" wrote:

I still get #N/A as a result.

"Peo Sjoblom" wrote:

One way

=(C2<"")*(VLOOKUP(E2,$J$2:$L$6,3,0)+IF(ISNUMBER(C 2),0.5,0))


Regards,

Peo Sjoblom

"Teri" wrote:

I have to calculate a value based on a VLOOKUP, but one of the cells (outside
the VLOOKUP table) may be blank. If that cell is blank, I want zero for an
answer. My current formula is:
=(VLOOKUP(E2,$J$2:$L$6,3)+IF(ISNUMBER(C2),0.5,0))

Cell E2 is a percentage
Cell C2 is a quote number

J K
L
GP Greater Than or Equal To€¦ But Less Than€¦ Points
-100% 0% 0.0
0% 21% 0.5
21% 31% 1.0
31% 40% 1.5
40% 101% 2.0

  #10   Report Post  
Harlan Grove
 
Posts: n/a
Default

"Teri" wrote...
I copied this right into my spreadsheet and got an error message.
Is there a ( missing somewhere?

"Harlan Grove" wrote:

....
=IF(C2="","",VLOOKUP(E2,$J$2:$L$6,3)+ISNUMBER(C2 ),0.5,0))


No, there's a missing IF call. Make that

=IF(C2="","",VLOOKUP(E2,$J$2:$L$6,3)+IF(ISNUMBER(C 2),0.5,0))


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
Average non continguous cells, excluding zero's Keithlearn Excel Worksheet Functions 2 April 27th 05 01:22 PM
Help adding text values Texas-DC_271 Excel Worksheet Functions 7 January 15th 05 11:14 PM
To safety merge cells without data destroyed, and smart unmerge! Kevin Excel Discussion (Misc queries) 0 December 30th 04 07:17 AM
Automatic copying data excluding blank cells Wesley Excel Worksheet Functions 6 November 30th 04 01:17 AM
excluding cells from the formula when empty Joe Shell Excel Worksheet Functions 5 November 21st 04 04:37 PM


All times are GMT +1. The time now is 06:11 PM.

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

About Us

"It's about Microsoft Excel"