Get values from other sheet using VBA

后端 未结 7 991
小蘑菇
小蘑菇 2020-12-09 01:55

I want to get values from other sheets.

I have some values in Excel (sheet2) for example:

    A  B  C  D
    -  -  -  -  
1 | 2  5  9  12
2 | 5  8           


        
7条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-09 02:32

    Maybe you can use the script i am using to retrieve a certain cell value from another sheet back to a specific sheet.

    Sub reviewRow()
    Application.ScreenUpdating = False
    Results = MsgBox("Do you want to View selected row?", vbYesNo, "")
    If Results = vbYes And Range("C10") > 1 Then
    i = Range("C10") //this is where i put the row number that i want to retrieve or review that can be changed as needed
    Worksheets("Sheet1").Range("C6") = Worksheets("Sheet2").Range("C" & i) //sheet names can be changed as necessary
    End if
    Application.ScreenUpdating = True
    End Sub
    

    You can make a form using this and personalize it as needed.

提交回复
热议问题