Please help me to filter Dr and Cr Balance from attached sheet.
Sandy
Please help me to filter Dr and Cr Balance from attached sheet.
Sandy
How to install your new code
- Copy the Excel VBA code
- Select the workbook in which you want to store the Excel VBA code
- Press Alt+F11 to open the Visual Basic Editor
- Choose Insert > Module
- Edit > Paste the macro into the module that appeared
- Close the VBEditor
- Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)
In C2 Cell![]()
Function GetType(r As Range) As String GetType = Right(r.Cells(1).Text, 2) End Function
=GetType(B2)
Drag it down...
If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
Mark your thread as Solved
If the suggestion helps you, then Click *below to Add Reputation
thanks and also an help to minus (-) sign before all Cr Balance if that possible
Sandy
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star iconbelow the post.
In C2 Cell
=IF(GetType(B2)="DR",B2,0-B2)
Drag it down...
Or
=IF(GetType(B2)="DR","DR","-CR")
Hi,
What process has caused each cell to be formatted differently as either a Dr or Cr?
It seems to me that you'd be better advised to address that process and ensure that it produces numbers with the correct sign. Your data would be much more useful.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks