View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default if then nested in a for next ??

Try it with: c.Formula =
instead of: c.Value =

"pls123" wrote:

Hi all i need this but it doesn't work like this... any suggestion ?? ty !!

For Each c In Selection.Cells

If Selection.Column = A Then
c.Value = "='C:\WB\[@@MYPAGE." & "-20.-20" & "." & c.Row & "." &
"11111.-11111.4" & ".xlsm]Sheet2'!$T$3"
End If
If Selection.Cells.Column = "B" Then
c.Value = "='C:\WB\[@@MYPAGE." & "-19.-19" & "." & c.Row & "." &
"11111.-11111.4" & ".xlsm]Sheet2'!$T$3"
End If
Next