Help with Function Error

wtsabo

New Member
Joined
Mar 3, 2010
Messages
39
I'm simply trying to create a formula that I have been typing manually.

The formula typically looks like this:
=INDIRECT($B5&"!"&C$1&$F$2)*$H$2

I tried the VBA code:
Function Figure(Name, Column, Row, Multiplier)
Figure = INDIRECT(Name&"!"&Column&Row)* Multiplier

End Function


Any ideas to what I'm doing wrong?

Thank you
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Surely it would be something like this (untested)

Code:
Function Figure(Name As String, Column As Long, Row As Long, multiplier As Variant)

Figure = Sheets(Name).Cells(Row, Column) * multiplier

End Function
 
Upvote 0
Neil,
I think that's close but still receiving an value error.

I tried with no luck
Function SubsidiaryFigure(SubsidiaryName As Variant, Column As Variant, Row As Long, multiplier As Integer)
SubsidiaryFigure = Sheets(SubsidiaryName).Cells(Row, Column) * multiplier
End Function
 
Upvote 0

Forum statistics

Threads
1,215,429
Messages
6,124,843
Members
449,193
Latest member
MikeVol

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