Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default first number after zeroes in sequence

This challenge has been ruining my morning:
What I am trying to do seems pretty simple, but I can't seem to find a
simple, elegant (or even complex, inelegant) solution. I am pulling
numbers from a database. Each row contains 10 years worth of data
(with the most recent number reported last). Unfortunately, I do not
have the same amount of data on each item, so many rows contain "0"
values in cells (time periods before reporting began). I am trying to
find the CAGR for the entire reported time period, starting with the
first data for each item. I am using a COUNTIF to determine number of
periods, but I am struggling mightily to come up with a formula
reporting the first value after the string of zeroes.
Any thoughts?
typical strings:

0 0 450 489 520 510 550 560

0 0 0 0 0 125 110 115

All I want is a formula that will return 450 for the first string of
numbers and 125 for the second.
Thanks much,
Mike

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default first number after zeroes in sequence

Assuming your data in row 1

=INDEX(1:1,MATCH(TRUE,1:1<0,0))

ctrl+shift+enter, not just enter


" wrote:

This challenge has been ruining my morning:
What I am trying to do seems pretty simple, but I can't seem to find a
simple, elegant (or even complex, inelegant) solution. I am pulling
numbers from a database. Each row contains 10 years worth of data
(with the most recent number reported last). Unfortunately, I do not
have the same amount of data on each item, so many rows contain "0"
values in cells (time periods before reporting began). I am trying to
find the CAGR for the entire reported time period, starting with the
first data for each item. I am using a COUNTIF to determine number of
periods, but I am struggling mightily to come up with a formula
reporting the first value after the string of zeroes.
Any thoughts?
typical strings:

0 0 450 489 520 510 550 560

0 0 0 0 0 125 110 115

All I want is a formula that will return 450 for the first string of
numbers and 125 for the second.
Thanks much,
Mike


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default first number after zeroes in sequence

Thanks Teethless Mama - that worked too! Multiple ways to skin a cat!

Appreciate the help.


Teethless mama wrote:
Assuming your data in row 1

=INDEX(1:1,MATCH(TRUE,1:1<0,0))

ctrl+shift+enter, not just enter


" wrote:

This challenge has been ruining my morning:
What I am trying to do seems pretty simple, but I can't seem to find a
simple, elegant (or even complex, inelegant) solution. I am pulling
numbers from a database. Each row contains 10 years worth of data
(with the most recent number reported last). Unfortunately, I do not
have the same amount of data on each item, so many rows contain "0"
values in cells (time periods before reporting began). I am trying to
find the CAGR for the entire reported time period, starting with the
first data for each item. I am using a COUNTIF to determine number of
periods, but I am struggling mightily to come up with a formula
reporting the first value after the string of zeroes.
Any thoughts?
typical strings:

0 0 450 489 520 510 550 560

0 0 0 0 0 125 110 115

All I want is a formula that will return 450 for the first string of
numbers and 125 for the second.
Thanks much,
Mike





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
From Template Save As Help Pammi J New Users to Excel 7 January 16th 07 02:49 PM
Pulling Data off Web - Need Function Help patfergie44 Excel Worksheet Functions 9 June 22nd 06 03:27 AM
Changing number sequence on different pages Johnny Raisinger Setting up and Configuration of Excel 1 June 21st 06 04:39 AM
A new sequence number in file everytime it is opened Tiger Claw Excel Worksheet Functions 1 June 15th 05 03:37 PM
Continuing Number Sequence Jen Excel Discussion (Misc queries) 2 January 12th 05 07:28 PM


All times are GMT +1. The time now is 04:35 AM.

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"