+ Reply to Thread
Results 1 to 4 of 4

populate last cell value inside shape based on matching another shape with sheet name

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-14-2021
    Location
    LY
    MS-Off Ver
    2019
    Posts
    271

    populate last cell value inside shape based on matching another shape with sheet name

    Hi experts !
    I want matching value inside shape(Rectangle 62) with sheet name , if it's matched , then populate last cell value from column F to inside shape(Rectangle 55)
    as I did result in source sheet in shape(Rectangle 55) . every time will add new values in column F for each sheet then will change the last cell value when populate inside shape(Rectangle 55) based on matching value inside shape(Rectangle 62) with sheet name.
    thanks
    Attached Files Attached Files

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,485

    Re: populate last cell value inside shape based on matching another shape with sheet name

    Sub Get_It()
        Dim ws As Worksheet
        Dim shp1 As Shape, shp2 As Shape
        Dim w As String
        Dim sht As Worksheet, rng As Range
        Set ws = Sheets("SOURCE")
        With ws
            Set shp1 = .Shapes("Rectangle 62")
            Set shp2 = .Shapes("Rectangle 55")
            w = shp1.TextFrame2.TextRange.Text
            With Sheets(w)
                Set rng = .Range("F" & .Cells(.Rows.Count, "F").End(xlUp).Row)
            End With
            shp2.TextFrame2.TextRange.Text = rng.Value
        End With
    End Sub

  3. #3
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,299

    Re: populate last cell value inside shape based on matching another shape with sheet name

    Sub J3v16()
    With Sheets("Source")
        .Shapes("Rectangle 55").TextFrame2.TextRange.Text = Sheets(.Shapes("Rectangle 62").TextFrame2.TextRange.Text).Range("F" & Rows.Count).End(xlUp)(1)
    End With
    End Sub
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  4. #4
    Forum Contributor
    Join Date
    07-14-2021
    Location
    LY
    MS-Off Ver
    2019
    Posts
    271

    Re: populate last cell value inside shape based on matching another shape with sheet name

    that's great !
    many thanks guys

+ 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. Replies: 0
    Last Post: 10-01-2020, 05:40 AM
  2. Replies: 0
    Last Post: 09-28-2020, 12:05 PM
  3. Replies: 6
    Last Post: 06-20-2016, 10:02 PM
  4. Assign macro with parameter to shape based on shape location
    By bobo3127 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-23-2014, 11:18 AM
  5. Select a shape based on a cell value and update the shape when value changes
    By BigAl99 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-14-2013, 12:06 PM
  6. Shape size based on text in shape
    By mwc48910 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-23-2011, 05:43 AM
  7. Retrieve Shape text when more than 255 characters inside shape
    By Wizz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-04-2009, 10:09 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