Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default Dealing with blank cells

hi again - I hope it's OK to ask 2 questions on the same day! This problem
is related to the one I posed earlier, but more general.

Let's say a sheet has 3 columns. Columns A and B contain numbers, but there
are also varying numbers of blank cells. I'm looking for a formula I can
drag down in column C that sums the B value (if it exists) and the first A
value encountered on the same row or above. Here is a sample.

A B C
6 1 7
7 13

3 9
8
4 12

2 10
7 3 10

What drag-down formula can I use in Column C?
I'm really knew at this, and I'm grateful for any clues.
Victoria
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Dealing with blank cells

Hi Victoria

<<I hope it's OK to ask 2 questions on the same day!

You are most welcome.


<<I'm looking for a formula I can drag down in column C that sums the
<<B value (if it exists) and the first A value

Try the below formula in C1 and copy down.
=IF(B1,LOOKUP(10^10,A$1:A1)+B1,"")

If this post helps click Yes
---------------
Jacob Skaria


"Victoria" wrote:

hi again - I hope it's OK to ask 2 questions on the same day! This problem
is related to the one I posed earlier, but more general.

Let's say a sheet has 3 columns. Columns A and B contain numbers, but there
are also varying numbers of blank cells. I'm looking for a formula I can
drag down in column C that sums the B value (if it exists) and the first A
value encountered on the same row or above. Here is a sample.

A B C
6 1 7
7 13

3 9
8
4 12

2 10
7 3 10

What drag-down formula can I use in Column C?
I'm really knew at this, and I'm grateful for any clues.
Victoria

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default Dealing with blank cells

Thanks Jacob - this works perfectly! But.... I'm not sure why??? Consider,
for example, the formula ...

=IF(B9,LOOKUP(10^10,A$1:A9)+B9,"")

The Excel help says that if the lookup_value (10^10) cannot be found in the
stated range, then it uses the largest value less than or equal to the
lookup_value. so, why does your function correctly pick the A value 7, even
though it isn't the largest value in A$1:A9?

=IF(B9,LOOKUP(10^10,A$1:A9)+B9,"")

"Jacob Skaria" wrote:

Hi Victoria

<<I hope it's OK to ask 2 questions on the same day!

You are most welcome.


<<I'm looking for a formula I can drag down in column C that sums the
<<B value (if it exists) and the first A value

Try the below formula in C1 and copy down.
=IF(B1,LOOKUP(10^10,A$1:A1)+B1,"")

If this post helps click Yes
---------------
Jacob Skaria


"Victoria" wrote:

hi again - I hope it's OK to ask 2 questions on the same day! This problem
is related to the one I posed earlier, but more general.

Let's say a sheet has 3 columns. Columns A and B contain numbers, but there
are also varying numbers of blank cells. I'm looking for a formula I can
drag down in column C that sums the B value (if it exists) and the first A
value encountered on the same row or above. Here is a sample.

A B C
6 1 7
7 13

3 9
8
4 12

2 10
7 3 10

What drag-down formula can I use in Column C?
I'm really knew at this, and I'm grateful for any clues.
Victoria

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Dealing with blank cells

That applies true for a sorted range. Here since 10^10 cannot be found it
picks up the last value in range

If this post helps click Yes
---------------
Jacob Skaria


"Victoria" wrote:

Thanks Jacob - this works perfectly! But.... I'm not sure why??? Consider,
for example, the formula ...

=IF(B9,LOOKUP(10^10,A$1:A9)+B9,"")

The Excel help says that if the lookup_value (10^10) cannot be found in the
stated range, then it uses the largest value less than or equal to the
lookup_value. so, why does your function correctly pick the A value 7, even
though it isn't the largest value in A$1:A9?

=IF(B9,LOOKUP(10^10,A$1:A9)+B9,"")

"Jacob Skaria" wrote:

Hi Victoria

<<I hope it's OK to ask 2 questions on the same day!

You are most welcome.


<<I'm looking for a formula I can drag down in column C that sums the
<<B value (if it exists) and the first A value

Try the below formula in C1 and copy down.
=IF(B1,LOOKUP(10^10,A$1:A1)+B1,"")

If this post helps click Yes
---------------
Jacob Skaria


"Victoria" wrote:

hi again - I hope it's OK to ask 2 questions on the same day! This problem
is related to the one I posed earlier, but more general.

Let's say a sheet has 3 columns. Columns A and B contain numbers, but there
are also varying numbers of blank cells. I'm looking for a formula I can
drag down in column C that sums the B value (if it exists) and the first A
value encountered on the same row or above. Here is a sample.

A B C
6 1 7
7 13

3 9
8
4 12

2 10
7 3 10

What drag-down formula can I use in Column C?
I'm really knew at this, and I'm grateful for any clues.
Victoria

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35
Default Dealing with blank cells

You ROCK!

"Jacob Skaria" wrote:

That applies true for a sorted range. Here since 10^10 cannot be found it
picks up the last value in range

If this post helps click Yes
---------------
Jacob Skaria


"Victoria" wrote:

Thanks Jacob - this works perfectly! But.... I'm not sure why??? Consider,
for example, the formula ...

=IF(B9,LOOKUP(10^10,A$1:A9)+B9,"")

The Excel help says that if the lookup_value (10^10) cannot be found in the
stated range, then it uses the largest value less than or equal to the
lookup_value. so, why does your function correctly pick the A value 7, even
though it isn't the largest value in A$1:A9?

=IF(B9,LOOKUP(10^10,A$1:A9)+B9,"")

"Jacob Skaria" wrote:

Hi Victoria

<<I hope it's OK to ask 2 questions on the same day!

You are most welcome.


<<I'm looking for a formula I can drag down in column C that sums the
<<B value (if it exists) and the first A value

Try the below formula in C1 and copy down.
=IF(B1,LOOKUP(10^10,A$1:A1)+B1,"")

If this post helps click Yes
---------------
Jacob Skaria


"Victoria" wrote:

hi again - I hope it's OK to ask 2 questions on the same day! This problem
is related to the one I posed earlier, but more general.

Let's say a sheet has 3 columns. Columns A and B contain numbers, but there
are also varying numbers of blank cells. I'm looking for a formula I can
drag down in column C that sums the B value (if it exists) and the first A
value encountered on the same row or above. Here is a sample.

A B C
6 1 7
7 13

3 9
8
4 12

2 10
7 3 10

What drag-down formula can I use in Column C?
I'm really knew at this, and I'm grateful for any clues.
Victoria

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
Index/match - make blank cells return a blank value. diaare Excel Worksheet Functions 3 May 3rd 23 03:44 AM
Excel 2002: Return blank when VLOOKUP on blank cells Mr. Low Excel Discussion (Misc queries) 2 June 4th 09 05:12 PM
Nested IF - return a blank when compared cells are blank Struggling in Sheffield[_2_] New Users to Excel 2 February 9th 09 08:14 PM
Maximum Number of Blank Cells between Non Blank Cells in a Range Mal Excel Worksheet Functions 5 November 3rd 07 08:21 AM
Imported Data creates blank cells that aren't really blank JackieD Excel Worksheet Functions 14 February 23rd 06 12:57 AM


All times are GMT +1. The time now is 10:25 AM.

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"