Solved

Can auto-increment in Excel autofill be disabled?

Posted on 2010-09-23
10
2,347 Views
Last Modified: 2012-05-10
Hi,

I have a column of numbers that I sometimes need to copy down to fill blanks. i use the Autofill feature, however it starts automatically doing fill series, and instead of copying the number it increments by 1. Then I have to click the euotfill options thingy that comes up and choose 'copy cells'. Supremely annoying.

Is there a way to disable this (just for this workbook/sheet/column - i.e. if I email it to someone, it will not do this in their excel either)? Perhaps a different number format? I tried changing the number format to text, but it still does it!

Any help greatly appreciated! Thank you!

Andrey
0
Comment
Question by:andreyman3d2k
  • 5
  • 5
10 Comments
 
LVL 24

Expert Comment

by:broomee9
ID: 33745130
The auto-complete feature is an application wide setting and cannot be turned off for one workbook by Excel settings.  You would have to use VBA to do it.  If that's something you want, let me know.
0
 
LVL 24

Expert Comment

by:broomee9
ID: 33745161
Below is the VBA, in case you do want to go that route.  The code would go into the ThisWorkbook module.  And it would disable Auto-complete for the entire application once the below workbook is opened.  Then before it's closed, it gets re-enabled.


Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Application.EnableAutoComplete = True
End Sub

Private Sub Workbook_Open()
    Application.EnableAutoComplete = False
End Sub

Open in new window

Book1.xls
0
 
LVL 6

Author Comment

by:andreyman3d2k
ID: 33745229
Unless I misunderstood your answer, I think we are talking about different things. I am talking about the auto-fill, not the auto-complete. I.e. where you can pull down the corner of the selected cell, and it copies the contents (or, as in my case, annoyingly increments it by one each time). Will your code disable this auto-incrementing? I still want to use the auto-fill, just not have it increment.

Thanks,

Andrey
0
 
LVL 6

Author Comment

by:andreyman3d2k
ID: 33745256
Here is an example of the number I am talking about:

US.NMH.09.03.015

if you place that into a cell then use the auto-fill to copy down, you will get

US.NMH.09.03.015
US.NMH.09.03.016
US.NMH.09.03.017
US.NMH.09.03.018

I want to get

US.NMH.09.03.015
US.NMH.09.03.015
US.NMH.09.03.015
US.NMH.09.03.015

without having to click that 'Autofill Options' icon that comes up
0
 
LVL 24

Accepted Solution

by:
broomee9 earned 500 total points
ID: 33745366
OK, I get what you're saying now.

To stop the autofill from incrementing, when you're dragging it down, hold the ctrl key, and then let go of the mouse.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 24

Expert Comment

by:broomee9
ID: 33745402
Alternatively, instead of using the fill handle, you can select your cell and all the cells below you want filled and press Ctrl + D and this will fill in the range with the value of the first cell highlighted.
0
 
LVL 6

Author Comment

by:andreyman3d2k
ID: 33745518
Thanks! Will the ctrl(or cmd)-drag work on Mac Office 2008?
0
 
LVL 24

Expert Comment

by:broomee9
ID: 33745652
According to this the Ctrl + D will work for Mac Office:

http://www.tongfamily.com/archives/2008/09/mac-excel-shortcuts/

I've never used a Mac though, so I can't say for sure.
0
 
LVL 6

Author Comment

by:andreyman3d2k
ID: 33745712
I just got a hold of a mac and tested it -- Option+drag works.

Thanks for your help!
0
 
LVL 6

Author Closing Comment

by:andreyman3d2k
ID: 33745721
Awesome, thank you.

Andrey
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now