Limit the Number of rows when dragging a formular

Qamarjulius

New Member
Joined
Sep 3, 2014
Messages
2
Hi Mr excel,
Is a way i can limit my rows in column A such that everytime i double click to drag it only goes up to 05 at a time.
AB
H100Jan-11
H101Jan-11
H102Jan-11
H103Jan-11
H104Jan-11
H105Jan-11
H200Feb-11
H201Feb-11
H202Feb-11
H203Feb-11
H204Feb-11
H205Feb-11
H300Mar-11
H301Mar-11
H302Mar-11
H303Mar-11
H304Mar-11
H305Mar-11
H400Apr-11
H401Apr-11
H402Apr-11

<colgroup><col style="width: 48pt;" span="2" width="64"> <tbody>
</tbody>
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"

Special-K99

Well-known Member
Joined
Nov 7, 2006
Messages
8,426
Office Version
  1. 2019
This should work

="H"&INT((ROWS($1:1)-1)/6)+100+MOD((ROWS($1:1)-1),5)

UPDATE: But it doesn't :( Still working on this...
 
Upvote 0

Special-K99

Well-known Member
Joined
Nov 7, 2006
Messages
8,426
Office Version
  1. 2019
...so try this one instead

="H"&INT((ROWS($1:1)-1)/5)*100+100+MOD((ROWS($1:1)-1),5)
 
Upvote 0

Qamarjulius

New Member
Joined
Sep 3, 2014
Messages
2
Rich (BB code):
="H"&INT((ROWS($1:1)-1)/6)*100+100+MOD((ROWS($1:1)-1),6)
:p

[wow!, this is great!]
[it works upto H905, after that i need it to replace 10 with O for October, then 11 with N for November and 12 with D for December]

[ see, the code H102 for instace, is a lot No, where H represents the year of manufacture, 1 represents Jan and 02 represents the second batch to be produced. The lot No cannot accomodate 6 digits(at least in this case) hence the need to replace 10,11 and 12 with one digit letters.]
[thanks for the good work so far]
 
Upvote 0

Forum statistics

Threads
1,191,287
Messages
5,985,756
Members
439,979
Latest member
alekun86

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
Top