Increment code automatically

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,832
Office Version
  1. 2007
Platform
  1. Windows
Hi,
Just a quick bit of advice before I look into continuing.

Imagine a range which is say A20:X23 & there is a code in each cell that is incremated by 1 each time as you go down the page.
Let’s say the last row with cell values is X20 X21 X22 X23

If a value was entered into cell Y20 can the code in the other cells automatically be incremenated by 1

Thanks.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Just an update.
I have started with this project and have advised the current situation below.

The new Range is now CF2:CI182

In cell CF182 we have a name but no code

In cell CG182 we have the code =--ISNUMBER(IFERROR(SEARCH($CE$2,CF182,1),""))

In cell CH182 we have the code =IF(CG182=1,COUNTIF($CG$2:CG182,1),"")

In cell CI182 we have the code =IFERROR(INDEX($CF$2:$CF$182,MATCH(ROWS($CH$2:CH182),$CH$2:$CH$182,0)),"")

Now if a name is inserted in the next cell down being CF183 how can we update the code above to reflect in the new row CF183

If it makes a difference on how the name is being entered in the new cell each time it is a copy / paste code from another sheet in the same workbook.

Many thanks.
 
Upvote 0
Just had a though,
This is the named range from the Name Manager.

Would the OFFSET code work ??

If so & the current named ranged supplied below can you advise how i would edit to to read/work correctly.
Thanks

Code:
=INFO!$CI$2:INDEX(INFO!$CI$2:$CI$182,MAX(INFO!$CH$2:$CH$182),1)
 
Upvote 0

Forum statistics

Threads
1,224,852
Messages
6,181,400
Members
453,035
Latest member
chrismor_gr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top