Consulting

Results 1 to 5 of 5

Thread: Vba to copy range from Sheet to another and define a name

  1. #1
    Banned VBAX Newbie
    Joined
    Oct 2023
    Posts
    3
    Location

    Post Vba to copy range from Sheet to another and define a name

    Good day all

    I need a vba code to do the following comands:

    1 - copy range ("GT300") and ("GV300", Selection.End(xlToRight)) from ("Sheet1")
    2 - H lookup ("Sheet1") ("GT291") on ("Sheet2").Range("B:B")
    3 - Add the copied ranges from ("Sheet1") as new entery on ("Sheet2") based on the H lookup result
    4 - Create new defined name from ("Sheet2") last entery from column D to last value on same row , Selection.CreateNames Top:=False, Left:=True, Bottom:=False, Right:=False
    Define range (1).jpg
    Attached Files Attached Files

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,060
    Location
    Welcome to VBAX PERSL. This sounds very much like a homework question.....
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    Banned VBAX Newbie
    Joined
    Oct 2023
    Posts
    3
    Location

    Post

    Quote Originally Posted by Aussiebear View Post
    Welcome to VBAX PERSL. This sounds very much like a homework question.....

    I need the code badly for my self

  4. #4

  5. #5
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,876
    Here's another link which should help you achieve what you want; your cross post at Eileen's Lounge: http://www.eileenslounge.com/viewtopic.php?f=27&t=40213

Posting Permissions

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