+ Reply to Thread
Results 1 to 2 of 2

% variance calculation - amended

  1. #1
    al
    Guest

    % variance calculation - amended

    Sub Macro2()

    Dim exptype

    exptype = InputBox("Enter e if expense type.")

    If exptype = "e" Then


    ActiveCell.FormulaR1C1 = "=-(RC[-1]/RC[-2]-1)"

    Else


    ActiveCell.FormulaR1C1 = "=RC[-1]/RC[-2]-1)"

    End If
    End Sub


    Pls help - why i'm not getting any result if exptype is not equal to e

    thxs


  2. #2
    Tushar Mehta
    Guest

    Re: % variance calculation - amended

    Check the formula you have when exptype is not e. Is it syntactically
    correct? Specifically, check the parenthesis use.

    --
    Regards,

    Tushar Mehta
    www.tushar-mehta.com
    Excel, PowerPoint, and VBA add-ins, tutorials
    Custom MS Office productivity solutions

    In article <1131348502.114507.224920@g44g2000cwa.googlegroups.com>,
    transferxxx@gmail.com says...
    > Sub Macro2()
    >
    > Dim exptype
    >
    > exptype = InputBox("Enter e if expense type.")
    >
    > If exptype = "e" Then
    >
    >
    > ActiveCell.FormulaR1C1 = "=-(RC[-1]/RC[-2]-1)"
    >
    > Else
    >
    >
    > ActiveCell.FormulaR1C1 = "=RC[-1]/RC[-2]-1)"
    >
    > End If
    > End Sub
    >
    >
    > Pls help - why i'm not getting any result if exptype is not equal to e
    >
    > thxs
    >
    >


+ 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