View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
PaulSinki[_5_] PaulSinki[_5_] is offline
external usenet poster
 
Posts: 1
Default Using result of user input?

Thanks Patrick, but this still doesn't seem to be picking up the cell
range that I need.

The code that I'm using now is:
MyValue3 = Application.InputBox("What week is it?")
Cells(3, 3) = MyValue3
intC = Range("o7:r7").Find(What:=MyValue3).Column
Set Cell = Range("o7:r7").Find(What:=MyValue3)
If Not Cell Is Nothing Then
intC = Cell.Column


For Each Cell In Selection
If Cell.Value < "" Then
Cell.Offset(0, 11).Value = "=INDEX('Raw
Data'!R1:R600,MATCH((Template!RC[-13]&Template!RC[-12]),'Raw
Data'!C1,0),MATCH(R7C,'Raw Data'!R3,0))"

End If
Next Cell
End If

If I set the range as d9:D360 before the loop, then it runs fine. But I
cannot for the life of me get the code right to pick the range as a
result of the input. For example, if the input is week 47, it does not
do anything, even though week 47 is in the range o7:r7.
Can anyone please help me?


---
Message posted from http://www.ExcelForum.com/