+ Reply to Thread
Results 1 to 5 of 5

Convert a formula in a cell to it's result

  1. #1
    BHTay
    Guest

    Convert a formula in a cell to it's result

    I have a cell with a formula which returns a date. I would like to convert
    the formula in the cell to it's result if another cell is >0. Can I do that?

  2. #2
    Ron de Bruin
    Guest

    Re: Convert a formula in a cell to it's result

    Hi BHTay

    You can use the change event to do this

    > if another cell is >0

    Do you change this cell manual or is it also a formula ?

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl



    "BHTay" <BHTay@discussions.microsoft.com> wrote in message news:9E670E9B-2151-47C4-8852-045B8ED6A2AD@microsoft.com...
    >I have a cell with a formula which returns a date. I would like to convert
    > the formula in the cell to it's result if another cell is >0. Can I do that?




  3. #3
    BHTay
    Guest

    Re: Convert a formula in a cell to it's result

    Hi Ron de Bruin,
    Thanks for the quick response.

    The other cell is a fomula.

    "Ron de Bruin" wrote:

    > Hi BHTay
    >
    > You can use the change event to do this
    >
    > > if another cell is >0

    > Do you change this cell manual or is it also a formula ?
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    >
    > "BHTay" <BHTay@discussions.microsoft.com> wrote in message news:9E670E9B-2151-47C4-8852-045B8ED6A2AD@microsoft.com...
    > >I have a cell with a formula which returns a date. I would like to convert
    > > the formula in the cell to it's result if another cell is >0. Can I do that?

    >
    >
    >


  4. #4
    Ron de Bruin
    Guest

    Re: Convert a formula in a cell to it's result

    Try this event in a sheet module

    If the formula in B1 > 0 then the formula in A1 change to a value

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim rng As Range
    If Target.Cells.Count > 1 Then Exit Sub
    On Error GoTo EndMacro
    If Not Target.HasFormula Then
    Set rng = Target.Dependents
    If Not Intersect(Range("B1"), rng) Is Nothing Then
    If Range("B1").Value > 0 Then
    Range("A1").Value = Range("A1").Value
    End If
    End If
    End If
    EndMacro:
    End Sub


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl



    "BHTay" <BHTay@discussions.microsoft.com> wrote in message news:C01F25B9-3A73-4868-A023-65DA3CEB26FA@microsoft.com...
    > Hi Ron de Bruin,
    > Thanks for the quick response.
    >
    > The other cell is a fomula.
    >
    > "Ron de Bruin" wrote:
    >
    >> Hi BHTay
    >>
    >> You can use the change event to do this
    >>
    >> > if another cell is >0

    >> Do you change this cell manual or is it also a formula ?
    >>
    >> --
    >> Regards Ron de Bruin
    >> http://www.rondebruin.nl
    >>
    >>
    >>
    >> "BHTay" <BHTay@discussions.microsoft.com> wrote in message news:9E670E9B-2151-47C4-8852-045B8ED6A2AD@microsoft.com...
    >> >I have a cell with a formula which returns a date. I would like to convert
    >> > the formula in the cell to it's result if another cell is >0. Can I do that?

    >>
    >>
    >>




  5. #5
    BHTay
    Guest

    Re: Convert a formula in a cell to it's result

    Thanks Ron. This seems to do the job.

    "Ron de Bruin" wrote:

    > Try this event in a sheet module
    >
    > If the formula in B1 > 0 then the formula in A1 change to a value
    >
    > Private Sub Worksheet_Change(ByVal Target As Range)
    > Dim rng As Range
    > If Target.Cells.Count > 1 Then Exit Sub
    > On Error GoTo EndMacro
    > If Not Target.HasFormula Then
    > Set rng = Target.Dependents
    > If Not Intersect(Range("B1"), rng) Is Nothing Then
    > If Range("B1").Value > 0 Then
    > Range("A1").Value = Range("A1").Value
    > End If
    > End If
    > End If
    > EndMacro:
    > End Sub
    >
    >
    > --
    > Regards Ron de Bruin
    > http://www.rondebruin.nl
    >
    >
    >
    > "BHTay" <BHTay@discussions.microsoft.com> wrote in message news:C01F25B9-3A73-4868-A023-65DA3CEB26FA@microsoft.com...
    > > Hi Ron de Bruin,
    > > Thanks for the quick response.
    > >
    > > The other cell is a fomula.
    > >
    > > "Ron de Bruin" wrote:
    > >
    > >> Hi BHTay
    > >>
    > >> You can use the change event to do this
    > >>
    > >> > if another cell is >0
    > >> Do you change this cell manual or is it also a formula ?
    > >>
    > >> --
    > >> Regards Ron de Bruin
    > >> http://www.rondebruin.nl
    > >>
    > >>
    > >>
    > >> "BHTay" <BHTay@discussions.microsoft.com> wrote in message news:9E670E9B-2151-47C4-8852-045B8ED6A2AD@microsoft.com...
    > >> >I have a cell with a formula which returns a date. I would like to convert
    > >> > the formula in the cell to it's result if another cell is >0. Can I do that?
    > >>
    > >>
    > >>

    >
    >
    >


+ 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