Excel VBA Macro

boilerup

New Member
Joined
Jul 17, 2019
Messages
10
Please provide a macro that will do this...

If Cell A2 is "Yes", copy values from cell B2 into "Data" tab cell A1 and refresh Smartview pull (I don't need to sign into Smartview).
If Cell A2 is "No", move vertically down to next cell, in this case would be Cell A3 and repeat.

Keep moving down vertically in column A with this logic. Function will end if there is no value in final cell of Column A (cell 12 has no value which would end the Macro).

1707447238756.png
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Try below code but I am not sure about "Smartview" ...
VBA Code:
Sub test()

With Sheets("Setup")
    For x = 2 To .Cells(Rows.Count, 1).End(3).Row
        If .Cells(x, 1) = "Yes" Then
            ['data'!a1] = .Cells(x, 2).Value
            ThisWorkbook.RefreshAll
        End If
    Next
End With

End Sub
 
Upvote 0

Forum statistics

Threads
1,215,101
Messages
6,123,094
Members
449,095
Latest member
gwguy

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
Back
Top