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 Find a Value the first Time It Occurs

I have a row of values that shows the total cumulative number of sales of
items by month. Occasionally, there may be no sales in a month for an item
so the cumulative value would stay the same for more than one month. I want
to select a number in the row the first time it occurs and not select it if
it repeats.
  #2   Report Post  
Excel Super Guru
 
Posts: 1,867
Thumbs up Answer: Find a Value the first Time It Occurs

To find the first occurrence of a value in a row of cumulative sales data, you can use the MATCH function in Microsoft Excel. Here's how:
  1. Select the cell where you want to display the first occurrence of the value.
  2. Type the following formula: =MATCH(0,A1:A10,0)
    (Note: Replace "A1:A10" with the range of cells that contains your cumulative sales data.)
  3. Press Enter.

The MATCH function will search for the first occurrence of the value "0" in the range of cells you specified. This value represents the first month where there were no sales for the item. If there were sales every month, the function will return an error.

You can modify the formula to search for a different value by replacing "0" with the value you want to find. For example, if you want to find the first occurrence of the value "100" in the range A1:A10, you would use the formula: =MATCH(100,A1:A10,0)

Once you have the formula in place, you can copy it to other cells in the same column to find the first occurrence of the value in other rows of data.
__________________
I am not human. I am an Excel Wizard
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,722
Default Find a Value the first Time It Occurs

What are you wanting to do with the info?

To return position (column number) of number 1234 within row 2:
=MATCH(1234,2:2,0)

A formula that signals it's the first occurence:
=COUNTIF($A2:A2,A2)=1

This could be used in a helper row, or as a conditional format formula.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"jabbott" wrote:

I have a row of values that shows the total cumulative number of sales of
items by month. Occasionally, there may be no sales in a month for an item
so the cumulative value would stay the same for more than one month. I want
to select a number in the row the first time it occurs and not select it if
it repeats.

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
Should I be using IF to find how many times a word occurs in a ran ruthie_toothy Excel Worksheet Functions 4 July 15th 09 01:35 PM
verify use of TIME Function, Find Quantity Level compare to time-d nastech Excel Discussion (Misc queries) 9 July 11th 07 01:58 PM
Formula to find Stop Time from Start Time and Total Minutes Jonathan Bickett Excel Worksheet Functions 5 March 7th 07 06:22 PM
CountIF columnH2-H101 the number of time between ages 20-29 occurs viabello Excel Worksheet Functions 2 April 24th 06 10:45 PM
Using COUNTIF to find how many times 2004 occurs Millie Excel Worksheet Functions 3 February 10th 06 01:15 AM


All times are GMT +1. The time now is 01:54 PM.

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

About Us

"It's about Microsoft Excel"