VBA in excel

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • murugavelmsc
    New Member
    • Apr 2008
    • 54

    VBA in excel

    I have given below a trial balance which is exported from Accounting package to excel. Negative Values are shown as CR and Postive Values are shown as DR. These values are formatted using custom format

    0.00" Cr"
    0.00" Dr"

    I want to filter the positive values in one coulmn and negative values in another column which i am not able to do so using if command of excel. Can anybody help in filtering these values

    Thanks
    Murugavel
  • xyxex
    New Member
    • Oct 2009
    • 1

    #2
    In the column that holds the amounts use the auto filter "custom" option.

    select "Contains" in 1st box & DR or CR in second.

    otherwise using the IF statement

    for +ve values if(right(a1,2)= "DR", A1,0) for your debit column
    and
    for -ve values if(right(a1,2)= "CR", A1,0) for your credit column

    A1 refers to the column that holds the mixed data.



    Originally posted by murugavelmsc
    I have given below a trial balance which is exported from Accounting package to excel. Negative Values are shown as CR and Postive Values are shown as DR. These values are formatted using custom format

    0.00" Cr"
    0.00" Dr"

    I want to filter the positive values in one coulmn and negative values in another column which i am not able to do so using if command of excel. Can anybody help in filtering these values

    Thanks
    Murugavel

    Comment

    • Dököll
      Recognized Expert Top Contributor
      • Nov 2006
      • 2379

      #3
      Please carry on, I did not realize the answer added:-)
      Originally posted by xyxex
      In the column that holds the amounts use the auto filter "custom" option.

      select "Contains" in 1st box & DR or CR in second.

      otherwise using the IF statement

      for +ve values if(right(a1,2)= "DR", A1,0) for your debit column
      and
      for -ve values if(right(a1,2)= "CR", A1,0) for your credit column

      A1 refers to the column that holds the mixed data.

      Comment

      Working...