Excel to Google Sheets Script

Joni_Depp

New Member
Joined
Mar 22, 2016
Messages
26
I am using a script below for excel to pull a certain row value from one sheet to another cell on a different sheet. I just want to know if this can be done with google sheets thru script and if it's possible, i will appreciate if you can walk me through the process. Here's the code I am using:

VBA Code:
Sub reviewRow()

Application.ScreenUpdating = False

Dim i As Integer

results = MsgBox("Do you want to View selected row?", vbYesNo, "")

If results = vbYes And Range("H13") > 1 Then
    i = Range("H13")
    
Worksheets("Sheet2").Range("D9") = Worksheets("Sheet3").Range("B" & i)
Worksheets("Sheet2").Range("D11") = Worksheets("Sheet3").Range("D" & i)
Worksheets("Sheet2").Range("D12") = Worksheets("Sheet3").Range("A" & i)
Worksheets("Sheet2").Range("H9") = Worksheets("Sheet3").Range("F" & i)
Worksheets("Sheet2").Range("H10") = Worksheets("Sheet3").Range("G" & i)
Worksheets("Sheet2").Range("H11") = Worksheets("Sheet3").Range("H" & i)
Worksheets("Sheet2").Range("K19") = Worksheets("Sheet3").Range("K" & i)
Worksheets("Sheet2").Range("K25") = Worksheets("Sheet3").Range("L" & i)
Worksheets("Sheet2").Range("K32") = Worksheets("Sheet3").Range("M" & i)
Worksheets("Sheet2").Range("K38") = Worksheets("Sheet3").Range("N" & i)
Worksheets("Sheet2").Range("K44") = Worksheets("Sheet3").Range("O" & i)
Worksheets("Sheet2").Range("K51") = Worksheets("Sheet3").Range("P" & i)
Worksheets("Sheet2").Range("K58") = Worksheets("Sheet3").Range("Q" & i)
Worksheets("Sheet2").Range("K65") = Worksheets("Sheet3").Range("R" & i)
Worksheets("Sheet2").Range("K71") = Worksheets("Sheet3").Range("S" & i)
Worksheets("Sheet2").Range("K82") = Worksheets("Sheet3").Range("T" & i)
Worksheets("Sheet2").Range("K89") = Worksheets("Sheet3").Range("U" & i)
Worksheets("Sheet2").Range("K95") = Worksheets("Sheet3").Range("V" & i)
Worksheets("Sheet2").Range("K101") = Worksheets("Sheet3").Range("W" & i)
Worksheets("Sheet2").Range("K107") = Worksheets("Sheet3").Range("X" & i)
Worksheets("Sheet2").Range("G19") = Worksheets("Sheet3").Range("Y" & i)
Worksheets("Sheet2").Range("G25") = Worksheets("Sheet3").Range("Z" & i)
Worksheets("Sheet2").Range("G32") = Worksheets("Sheet3").Range("AA" & i)
Worksheets("Sheet2").Range("G38") = Worksheets("Sheet3").Range("AB" & i)
Worksheets("Sheet2").Range("G44") = Worksheets("Sheet3").Range("AC" & i)
Worksheets("Sheet2").Range("G51") = Worksheets("Sheet3").Range("AD" & i)
Worksheets("Sheet2").Range("G58") = Worksheets("Sheet3").Range("AE" & i)
Worksheets("Sheet2").Range("G65") = Worksheets("Sheet3").Range("AF" & i)
Worksheets("Sheet2").Range("G71") = Worksheets("Sheet3").Range("AG" & i)
Worksheets("Sheet2").Range("G82") = Worksheets("Sheet3").Range("AH" & i)
Worksheets("Sheet2").Range("G89") = Worksheets("Sheet3").Range("AI" & i)
Worksheets("Sheet2").Range("G95") = Worksheets("Sheet3").Range("AJ" & i)
Worksheets("Sheet2").Range("G101") = Worksheets("Sheet3").Range("AK" & i)
Worksheets("Sheet2").Range("G107") = Worksheets("Sheet3").Range("AL" & i)

Range("D9").Select

End If

Application.ScreenUpdating = True

End Sub
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

jasonb75

Well-known Member
Joined
Dec 30, 2008
Messages
12,602
Office Version
  1. 365
Platform
  1. Windows
I expect that most members of MrExcel do not know how to write google script, but might be able to understand it enough to convert it to vba.

You would be better off asking this question on a google forum where people will have a better understanding of the correct script.

If you do post on other forums, please remember to provide cross post links in all threads.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,417
Messages
5,636,152
Members
416,903
Latest member
Sanjayaranj

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top