ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   refer to same cell in other worksheet (https://www.excelbanter.com/excel-programming/357316-refer-same-cell-other-worksheet.html)

JW Rutgers

refer to same cell in other worksheet
 
I am analyzing various ranges in a worksheet. If a cell in the range is
empty, I want this cell to have the value of the same cell reference in
another worksheet.
Up to now I picked the value by using a relative reference within the
worksheet, but I now have to pick the value from the same cell reference in
another worksheet

For Each rnCell In rnArea
If rnCell.Value = "" Then
rnCell.Formula = rnCell6.offset(23, 0).FormulaR1C1
End If
Next

Is there a solution?



Ardus Petus

refer to same cell in other worksheet
 
rnCell.Formula = Worksheets("Sheet2").Range(rnCell.Address).Formula

HTH
--
AP

"JW Rutgers" a écrit dans le message de
. ..
I am analyzing various ranges in a worksheet. If a cell in the range is
empty, I want this cell to have the value of the same cell reference in
another worksheet.
Up to now I picked the value by using a relative reference within the
worksheet, but I now have to pick the value from the same cell reference

in
another worksheet

For Each rnCell In rnArea
If rnCell.Value = "" Then
rnCell.Formula = rnCell6.offset(23, 0).FormulaR1C1
End If
Next

Is there a solution?





JW Rutgers

refer to same cell in other worksheet
 
Thanks! It works great


"Ardus Petus" schreef in bericht
...
rnCell.Formula = Worksheets("Sheet2").Range(rnCell.Address).Formula

HTH
--
AP

"JW Rutgers" a écrit dans le message de
. ..
I am analyzing various ranges in a worksheet. If a cell in the range is
empty, I want this cell to have the value of the same cell reference in
another worksheet.
Up to now I picked the value by using a relative reference within the
worksheet, but I now have to pick the value from the same cell reference

in
another worksheet

For Each rnCell In rnArea
If rnCell.Value = "" Then
rnCell.Formula = rnCell6.offset(23, 0).FormulaR1C1
End If
Next

Is there a solution?








All times are GMT +1. The time now is 11:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com