Consulting

Results 1 to 1 of 1

Thread: Macro to copy a cell value and put in different worksheet

  1. #1

    Question Macro to copy a cell value and put in different worksheet

    This one will be interesting. Basically I want to know if this is even possible.


    The first step should be reading the cell value "L3" and in the image below it's 25, but it might change. The next step should be checking what is it attached as you can see for the second step in "A3" it is attached to "SR 1". Then I have this other sheet which is called "Risku karte" as you can see in the 3rd and 4th step. For now it shows you that it is a different workbook, but all of it will be in the same workbook. So in this sheet the task is to put a small thing, like a text or something in this case "SR 1" to it's attached number which is 25. You can see how it looks in the image on right. I don't know how that would work, tell me if that's even possible. Maybe to put like a text icon or something, I really don't know.
    I genuinely don't know if this is possible, but at the same time it doesn't sound that bad, but I have no idea what to do as I am no VBA expert, not even close.
    There are like 96 rows of different values and if someone changes the value of column "L" it should automatically put these small icons/images/text in other sheet according to the value.
    I did quite a lot of research on how could I maybe do this, but without success.
    I would love all the help I could get regarding this problem, and if there is any questions, please ask.
    Thank you so much in advance!


    THIS IS WHAT I'VE TRIED SO FAR, IT RUNS, BUT IT DOESN'T DO ANYTHING.
    
    
    Sub CopyIt()
    
    
    Application.ScreenUpdating = False
    
    
    
    
    With ActiveSheet
        .AutoFilterMode = False
        With Range("L1", Range("L" & Rows.Count).End(xlUp))
            .AutoFilter 1, "25"
            On Error Resume Next
            Riskukarte.Range("G").End(xlUp).PasteSpecial xlPasteValues
        End With
        .AutoFilterMode = False
    End With
    
    
    Application.ScreenUpdating = True
    Application.CutCopyMode = False
    Riskukarte.Select
    
    
    End Sub
    Last edited by Goldyyy; 10-29-2020 at 02:29 AM. Reason: Added code

Tags for this Thread

Posting Permissions

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