+ Reply to Thread
Results 1 to 7 of 7

How to insert new text in a cell then pushing down the previous text?

Hybrid View

  1. #1
    Registered User
    Join Date
    05-10-2015
    Location
    France
    MS-Off Ver
    10
    Posts
    58

    How to insert new text in a cell then pushing down the previous text?

    Hi,
    My solution so far is to copy the previous content of that cell & paste one cell down, then add the new text in that cell.

    Example: I wish to store in Range("AN2").Value, the new action found. The list of all actions get stored into AN2:AN100.
    So first I copy Range("AN2:AN100") then paste it to Range("AN3:AN101"). Then store in AN2 the new text.

    But is there a better way?
    Thanks,

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: How to insert new text in a cell then pushing down the previous text?

    Is this with vba code? or manual?
    Either way why not just insert a new cell at AN2?
    Range("AN2").Insert shift:=xlDown
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: How to insert new text in a cell then pushing down the previous text?

    Why not just insert new cell/row at AN2?
    Insert Cell
    Sub insertCellShiftDown()
    Range("AN2").Insert xlDown
    End Sub
    Insert Row
    Sub insertRowShiftDown()
    Range("AN2").EntireRow.Insert
    End Sub

  4. #4
    Registered User
    Join Date
    05-10-2015
    Location
    France
    MS-Off Ver
    10
    Posts
    58

    Re: How to insert new text in a cell then pushing down the previous text?

    Yes it works. So simple indeed!

    Strange, I had tried Insert and somehow it had not worked. Now it does ?
    That is in VBA of course.
    Thank you,
    Daniel

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: How to insert new text in a cell then pushing down the previous text?

    @CK76, great minds think alike (or is it fools seldom differ, lol)

  6. #6
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,973

    Re: How to insert new text in a cell then pushing down the previous text?

    great minds think alike (or is it fools seldom differ, lol)
    lol. It might have something to do with country

  7. #7
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: How to insert new text in a cell then pushing down the previous text?

    I would go this way.

    You do not need to do anything other than type into AN2

    
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address <> "$AN$2" Then Exit Sub
    Application.EnableEvents = False
    Temp = Range("AN2").Value
    Application.Undo
    Range("AN2").Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
    Range("AN2").Value = Temp
    Application.EnableEvents = True
    End Sub
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

+ 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. Insert Lines based on Cell value, Find Last Occurrence of text, Delete Previous Informatio
    By FranktheBank in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-11-2015, 03:49 PM
  2. If cell equals a text then insert a number, (text cell comes from a data validation)
    By floridashaughn in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-15-2014, 03:24 PM
  3. Replies: 7
    Last Post: 01-04-2014, 10:11 PM
  4. Formula to identify part of a text in cell from range of cells & insert adjacent cell text
    By Novicebutnotforlong in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 11-19-2013, 02:11 AM
  5. [SOLVED] Use .text from previous text box in form to prefill text in second text box
    By chromachem in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-23-2012, 10:04 PM
  6. Insert date on userform based upon previous text box input.
    By clemsoncooz in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-02-2012, 04:09 PM
  7. Compare text in a cell with the text in the previous cell and return a value
    By kinley in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-09-2010, 04:14 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