+ Reply to Thread
Results 1 to 7 of 7

Adding Names to the next empty cell..Pls help!!!!

  1. #1
    Registered User
    Join Date
    11-09-2006
    Posts
    7

    Unhappy Adding Names to the next empty cell..Pls help!!!!

    Hello Guys,
    I need your help with this. To tell you honestly Im not good in macro.
    This maybe so easy to understand but not for me...

    I want to insert Name here (B1) and Click the button so that it will add to the row(A11) below. But after adding new names and clicking the button the new name will just paste to the same cell. Can you tell me please why my recorded macro doesn't work? I want everytime after adding new name this
    will go to the next empty cell. You can view to the attachement for my recorded macro.

    Thanks in advance for the help guys..:
    Attached Files Attached Files

  2. #2
    Forum Contributor stevebriz's Avatar
    Join Date
    09-07-2006
    Location
    Santiago Chile
    Posts
    389
    I need to aks a couple questions to clarify what you want here.

    Am I correct in assuming you only want to add new names the first blank cell in row 11?
    If the name exists already in row 11 ....do not add it again?
    VBA - The Power Behind the Grid

    Posting a sample of your workbook makes it easier to look at the Issue.

  3. #3
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Response

    Try this much simpler macro

    Sub Macro1()
    Range("A65536").End(xlUp).Offset(1, 0) = Range("B1")
    End Sub
    Martin

  4. #4
    Registered User
    Join Date
    11-09-2006
    Posts
    7
    Quote Originally Posted by stevebriz
    I need to aks a couple questions to clarify what you want here.

    Am I correct in assuming you only want to add new names the first blank cell in row 11?
    If the name exists already in row 11 ....do not add it again?
    Thanks for spending time with my inquiry.
    Actually my main concern is that everytime I want to add either new or same name ,it should go to the next blank cell.For Example the previous name is in column A, Row 11 the next name should be on same column but on Row 12 and again if I want to add new name it should go to Row 13 and so on...

    Hoping you could extend help to me once more..
    Thanks...

  5. #5
    Registered User
    Join Date
    11-09-2006
    Posts
    7
    Quote Originally Posted by mrice
    Try this much simpler macro

    Sub Macro1()
    Range("A65536").End(xlUp).Offset(1, 0) = Range("B1")
    End Sub
    Now it works...
    Thanks alot mrice for your help..I thought I would end with nothing with my query...

    @Stevebriz--thanks to you also bro..

    Once again thank you guys....

  6. #6
    Registered User
    Join Date
    11-09-2006
    Posts
    7

    Exclamation

    Quote Originally Posted by eliezer
    Now it works...
    Thanks alot mrice for your help..I thought I would end with nothing with my query...

    @Stevebriz--thanks to you also bro..

    Once again thank you guys....
    Hello guyz,

    Last time mrice gave me this simple macro and it works .Im not good with this but Im so eager to learn with this one..could someone give me a short explanation about this formula especially "A65536".
    and how will I get this no.?

    Here is the macro:
    Sub NEWDATA()

    Range("A65536").End(xlUp).Offset(1, 0) = Range("A1")

    Onegaishimasu...(trans: Please....)

  7. #7
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Response

    65536 is just the last row on a spreadsheet and therefore A65536 is the last row in column A.

    It's a good way of working out the last occupied cell in a column using

    Range("A65536").end(xlup).row

    It's equivalent selecting the last cell with your mouse, hitting the end key and then up arrow to find the last occupied cell. (this is what the end(xlup) bit does).

    If you want the next available cell, you need to look for the cell below the last occupied one. Therefore

    Range("A65536").end(xlup).offset(1,0)

    gives you this.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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