Sheetoffset help needed

bhbaldwin

New Member
Joined
Jun 30, 2014
Messages
3
I am using the sheetoffset formula that has been written about previously on this site. I would like to input the value for a cell from the sheet next to it if it has been left blank on the original sheet.

Here is the code for the sheetoffset function:

Function SHEETOFFSET(offset, Ref)
' Returns cell contents at Ref, in sheet offset
Application.Volatile
With Application.Caller.Parent
SHEETOFFSET = .Parent.Sheets(.Index + offset) _
.Range(Ref.Address).Value
End With
End Function

The formula I am trying is:

=IF(ISBLANK(D2),sheetoffset(1,D2),D2)

This is only returning 0s for every cell. Ideally if D2 were blank on the current sheet it would input the value for D2 listed on the sheet to the right but if D2 were filled in it would retain the current value for D2. I am not sure where I am going wrong with this. Any help would be much appreciated.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
I believe there may be a circular reference being created that is affecting the result but I am not sure of a way to resolve the problem.
 
Upvote 0
If anyone is interested, the solution requires enabling iterative calculations through file --> options --> formulas --> enable iterative calculations
 
Upvote 0

Forum statistics

Threads
1,223,908
Messages
6,175,305
Members
452,633
Latest member
DougMo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top