+ Reply to Thread
Results 1 to 17 of 17

Macro for name transfere

  1. #1
    Valued Forum Contributor
    Join Date
    05-19-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    391

    Cool Macro for name transfere

    this is my first post on this site so I hope I post it properly

    I have posted this on MrExcel and recieved a macro but not working properly and no further help

    I have an employee calendar and when I enter a name I would like the name to appear on another sheet in column A. I have attached a calendar for july and the macro I was sent

    Sub LinkText()

    Dim Dd As Date, Sname As String
    Dim Lrow As Long, I As Long, Rcol As Byte, K As Byte, J As Long


    J = 1

    Rcol = Range("IV1").End(xlToLeft).Column

    For K = 1 To Rcol

    Lrow = Cells(65536, K).End(xlUp).Row
    Dd = Cells(1, K)

    For I = 2 To Lrow

    If Len(Cells(I, K)) > 0 Then

    Sname = Cells(I, K) & "-----" & CStr(Dd)
    Sheet2.Range("A" & J) = Sname
    J = J + 1

    End If

    Next I

    Next K


    End Sub
    Attached Files Attached Files
    Last edited by grizzly6969; 05-22-2010 at 02:34 AM.

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Macro for name transfere

    dude can you please add code tags and zip the file?
    the problem wont be to hard to solve
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Valued Forum Contributor
    Join Date
    05-19-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Macro for name transfere

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Macro for name transfere

    hi grizzly6969
    one way is to place this code in the july worksheet module
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    05-19-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Macro for name transfere

    The macro works is there a way to have the date added and is there a way to have it update automatically --- I noticed if I add a name I have to go to view code and hit F5 to get new name to appear

  6. #6
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Macro for name transfere

    shouldnt if you change sheets it triggers a change sheet event and the macro
    its is in the jly sheet module and events are enabled?

  7. #7
    Valued Forum Contributor
    Join Date
    05-19-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Macro for name transfere

    were do I check to see if events are enabled

  8. #8
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Macro for name transfere

    try this one
    Attached Files Attached Files

  9. #9
    Valued Forum Contributor
    Join Date
    05-19-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Macro for name transfere

    yep yours works great

  10. #10
    Valued Forum Contributor
    Join Date
    05-19-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Macro for name transfere

    I deleted the code and copied it in again and it works would like it to display a date if possible ---- if not it still works good
    THanks for your help

  11. #11
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Macro for name transfere

    hi grizzly6969
    the dates in the shapes are apain can the link contain the date?

  12. #12
    Valued Forum Contributor
    Join Date
    05-19-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Macro for name transfere

    not sure if I can get the date in the link but would it be any easier if in place of 1 -- I put in July 1 --- and 2 --- put in july 2 etc etc.

  13. #13
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Macro for name transfere

    no , not realy as its difficult to find the right shape

  14. #14
    Valued Forum Contributor
    Join Date
    05-19-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Macro for name transfere

    Thank you very much for your help . This will work fine

  15. #15
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Macro for name transfere

    Ok maybe ...what you could is have the cell behind the shape equal the shapes value then
    then look at cells address and if it is within an area it will equal the dates vaalue

  16. #16
    Valued Forum Contributor
    Join Date
    05-19-2010
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    391

    Re: Macro for name transfere

    I will give it a try
    again thank you for your time

    I would tag this solved but I cant find were to change it

  17. #17
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Macro for name transfere

    I keep think and to mark the thread solved
    go back to your very first post and click EDIT
    then click GO ADVANCED
    then scroll up to the thread title and change the PREFIX combobox to solved
    then save
    all done

+ 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