Solved

Can auto-increment in Excel autofill be disabled?

Posted on 2010-09-23
10
2,368 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
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
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
 
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Workbook link problems after copying tabs to a new workbook? David Miller (dlmille) Intro Have you either copied sheets to a new workbook, and after having saved and opened that workbook, you find that there are links back to the original sou…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

773 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