+ Reply to Thread
Results 1 to 2 of 2

Select cell formula based on criteria

  1. #1

    Select cell formula based on criteria

    Is there a way to conditionally select a cell's formula? I have a
    situation where a calculation will be different depending on whether an
    employee is hourly or salary. I know I can use an IF function, but the
    formula for each condition is rather involved, and it would make the
    cell formula pretty cumbersome to combine the two. I was wondering if
    there is some way to use the INDIRECT function so that if a status of
    hourly was selected, the formula used would come from cell B1, and if a
    status of salaried was selected, the formula definition in cell B2
    would be used. I suppose I could write a VBA function, but I was
    curious if anyone has been able to do this without VBA.


  2. #2
    Miguel Zapico
    Guest

    RE: Select cell formula based on criteria

    You may take a look at the Excel 4.0 macro function EVALUATE. There is an
    example here:
    http://www.ozgrid.com/News/excel-eva...ormula-VBA.htm
    That may give you some ideas.

    Hope this helps,
    Miguel.

    "[email protected]" wrote:

    > Is there a way to conditionally select a cell's formula? I have a
    > situation where a calculation will be different depending on whether an
    > employee is hourly or salary. I know I can use an IF function, but the
    > formula for each condition is rather involved, and it would make the
    > cell formula pretty cumbersome to combine the two. I was wondering if
    > there is some way to use the INDIRECT function so that if a status of
    > hourly was selected, the formula used would come from cell B1, and if a
    > status of salaried was selected, the formula definition in cell B2
    > would be used. I suppose I could write a VBA function, but I was
    > curious if anyone has been able to do this without VBA.
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1