Sorin Paul
Sorin Paul

Reputation: 5

Cell select based on InputBox

I have an InputBox where the user enters a cell value. Based on the input I need Excel to jump to that cell.

I have this code but it doesn't do what I need.

Dim myValue As Variant

myValue = InputBox("IF Week 1, insert W3, if Week 2 insert S3, if week 3 insert O3 or if Week 4 insert K3")

Sheets("Global").Select

Range("myValue").Select

Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=False

Upvotes: 0

Views: 1066

Answers (1)

Cody Geisler
Cody Geisler

Reputation: 8617

myValue = InputBox("IF Week 1, insert W3, if Week 2 insert S3, if week 3 insert O3 or if Week 4 insert K3")
Sheets("Global").Select 
Range(myValue).Select

Upvotes: 1

Related Questions