A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

assign next serial number based on contents of another cell



 
 
Thread Tools Display Modes
  #1  
Old August 23rd, 2009, 08:09 AM posted to microsoft.public.excel.newusers
Clint
external usenet poster
 
Posts: 72
Default assign next serial number based on contents of another cell

column A titled "serial number", column B titled "line item", column C titled
"cargo".
If column B contains 5 line items for the same cargo in column C, how do I
get column A to input the next serial number only after contents in Column C
has changed.



  #2  
Old August 23rd, 2009, 08:51 AM posted to microsoft.public.excel.newusers
Per Jessen
external usenet poster
 
Posts: 686
Default assign next serial number based on contents of another cell

Hi

Enter first serial number in A2, then insert this formula in A3 and copy
down. If cargo cell is empty, serial number cell will also be empty.

=IF(C3"",IF(C3C2,A2+1,A2),"")

Hopes this helps.
....
Per

"clint" skrev i meddelelsen
...
column A titled "serial number", column B titled "line item", column C
titled
"cargo".
If column B contains 5 line items for the same cargo in column C, how do I
get column A to input the next serial number only after contents in Column
C
has changed.




  #3  
Old August 26th, 2009, 01:57 AM posted to microsoft.public.excel.newusers
pshepard
external usenet poster
 
Posts: 71
Default assign next serial number based on contents of another cell

Hi Clint,

To increment one number in the serial number column when:

1. Cargo text field changes

OR

2. Above the current row there are 5 lines with the same cargo text as the
current row, AND those rows have the same serial number as the preceding row.

In cell A2 enter first serial number - i.e. 1001.

In cell A3 enter:

=IF(C2C3,A2+1,IF(COUNTIF(INDIRECT("C"&MATCH(A2,A :A,0)):C3,C3)5,A2+1,A2))

Hope this helps.

Peggy

"clint" wrote:

column A titled "serial number", column B titled "line item", column C titled
"cargo".
If column B contains 5 line items for the same cargo in column C, how do I
get column A to input the next serial number only after contents in Column C
has changed.



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:25 PM.


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