ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   lookup and placeholder function (https://www.excelbanter.com/excel-worksheet-functions/264130-lookup-placeholder-function.html)

Cam

lookup and placeholder function
 
Hello,

I have a sheet with date (some have the same date), order# (6 numeric
digits, etc.. I want to add another column to look if there are more than one
record with the same date, sequentially add a placeholder 1, 2, 3, etc. to
this column. What function do I use? Thanks

Sample:
Date Order# Part#
5/2/10 123456 AA
5/2/10 356450 AA
5/5/10 356480 AB
5/9/10 356000 AA
5/9/10 256450 BC
5/9/10 306450 AB

Result:
Date Order# Part# Placeholder
5/2/10 123456 AA 1
5/2/10 356450 AA 2
5/5/10 356480 AB 1
5/9/10 356000 AA 1
5/9/10 256450 BC 2
5/9/10 306450 AB 3

Mike H

lookup and placeholder function
 
Hi,

Assuming your dates start in A2, put this in D2 and drag down

=COUNTIF($A$2:A2,A2)
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Cam" wrote:

Hello,

I have a sheet with date (some have the same date), order# (6 numeric
digits, etc.. I want to add another column to look if there are more than one
record with the same date, sequentially add a placeholder 1, 2, 3, etc. to
this column. What function do I use? Thanks

Sample:
Date Order# Part#
5/2/10 123456 AA
5/2/10 356450 AA
5/5/10 356480 AB
5/9/10 356000 AA
5/9/10 256450 BC
5/9/10 306450 AB

Result:
Date Order# Part# Placeholder
5/2/10 123456 AA 1
5/2/10 356450 AA 2
5/5/10 356480 AB 1
5/9/10 356000 AA 1
5/9/10 256450 BC 2
5/9/10 306450 AB 3


Arvi Laanemets

lookup and placeholder function
 
Hi

Let's assume your table starts at Sheet1!A1, and in 1st row are column
headings.

Into D2 enter the formula:
=IF($A2="","",COUNTIF($A$2:$A2))
, and copy it down (you can have the formula in advance, so whenever you add
a new row, the placeholder is calculated immediately).


Arvi Laanemets

"Cam" kirjutas sõnumis news:
...
Hello,

I have a sheet with date (some have the same date), order# (6 numeric
digits, etc.. I want to add another column to look if there are more than
one
record with the same date, sequentially add a placeholder 1, 2, 3, etc. to
this column. What function do I use? Thanks

Sample:
Date Order# Part#
5/2/10 123456 AA
5/2/10 356450 AA
5/5/10 356480 AB
5/9/10 356000 AA
5/9/10 256450 BC
5/9/10 306450 AB

Result:
Date Order# Part# Placeholder
5/2/10 123456 AA 1
5/2/10 356450 AA 2
5/5/10 356480 AB 1
5/9/10 356000 AA 1
5/9/10 256450 BC 2
5/9/10 306450 AB 3




All times are GMT +1. The time now is 03:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com