简体   繁体   中英

VBA - Show Formula in cell when variable value

The code below shows only value in cell. How do I make it show the whole path from where it was taken?

If Worksheets("Final").Cells(j, 8).value = "Gross" Then
      Worksheets("Final").Cells(j, 11).value = .Cells(i, 2).value
      Worksheets("Final").Cells(j, 12).value = "=(" & .Cells(i, 2).value & ")"
End If

It shows the value only:

在此处输入图片说明 I would like it to show:

在此处输入图片说明

Worksheets("Final").Cells(j, 12).Formula = "='" & .Name & "'!" & .Cells(i, 2).Address(False, False)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM