+ Reply to Thread
Results 1 to 6 of 6

A macro to auto fill in text depending upon cell content

  1. #1
    Registered User
    Join Date
    09-12-2014
    Location
    Liverpool, England
    MS-Off Ver
    2007
    Posts
    14

    Smile A macro to auto fill in text depending upon cell content

    Hi Guys,
    I am hoping for a little (lot) of help please.
    I have created a workbook to help keep track of work. It is working great but time consuming entering a lot of text. I would like to use a macro to help with text entry.

    I would like when I enter N in column G then columns H,I,J,K,L,M,N,O,P,Q,R all become N/A
    I would like when I enter N in column S then columns T,U,V,W all become N/A
    I would like when I enter N in column Y then columns Z,AA,AB,AC,AD,AE,AF,AG all become N/A
    I would like when I enter N in column AI then columns AJ,AK,AL all become N/A
    I would like when I enter N in column AM then columns AN,AO,AP,AQ,AR all become N/A
    I would like when I enter N in column AS then column AT becomes N/A

    I have attached a copy of workbook with line 2 filled in is an example.


    Thanks a lot in advance.

    ***** this workbook will possibly reach 1000+ job numbers in future*****

    Thanks again
    Attached Files Attached Files
    Last edited by johngefc; 09-18-2014 at 06:17 PM. Reason: Needed to add future use info

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: A macro to auto fill in text depending upon cell content

    Try adding this code into Sheet1. I've added in code to go to the next empty cell, you can remove them if not needed.
    Please Login or Register  to view this content.
    多么想要告诉你 我好喜欢你

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,918

    Re: A macro to auto fill in text depending upon cell content

    Please Login or Register  to view this content.
    Last edited by protonLeah; 09-18-2014 at 10:10 PM.
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    09-12-2014
    Location
    Liverpool, England
    MS-Off Ver
    2007
    Posts
    14

    Re: A macro to auto fill in text depending upon cell content

    Thanks Guys,
    I am a very basic beginner so I do not know how to enter this to make it work.
    I know to press alt f11 then insert, module then paste
    then return to worksheet to view tab, click macros then run selected but this does not work.
    Sorry to be a complete novice but if possible could someone please post step by step instructions for how to make this work.
    Also will this then auto complete with further entries into the workbook?
    Thanks in advance

  5. #5
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,918

    Re: A macro to auto fill in text depending upon cell content

    How to install your new code
    1. Copy the Excel VBA code from the forum post.
    2. Select the workbook in which you want to store the Excel VBA code:
    3. Right click the tab you want the macro in
      This opens the Visual Basic Editor; the cursor will be blinking in the code pane.
    4. Edit > Paste the macro into the code pane.
    5. Close the VBEditor
    6. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    Since this is a worksheet change event macro it wil run every time a change is made in that sheet.

  6. #6
    Registered User
    Join Date
    09-12-2014
    Location
    Liverpool, England
    MS-Off Ver
    2007
    Posts
    14

    Re: A macro to auto fill in text depending upon cell content

    Thanks a lot for that.
    Sorry to be so daft.
    That works great.
    Thanks again

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macros auto hiding of rows depending on cell content
    By nad23 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-08-2012, 12:40 PM
  2. Macro to copy and paste variable depending on cell content
    By ejh88 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-21-2012, 06:13 PM
  3. Excel VBA Change text colour depending on another cell's content
    By jell in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-15-2010, 11:05 AM
  4. Dragging cell content to auto fill...I think
    By MixedUpMusic in forum Excel General
    Replies: 13
    Last Post: 07-16-2008, 10:30 AM
  5. Auto fill multiple cells depending on single cell value
    By henrat in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-28-2005, 01:10 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1