Need cells within a column to indent based on the condition that a value was entered into one of two columns (accounting journal entries)

I have four columns that I make general ledger accounting journal entries in excel that is set up as follows:
Column A- Date
Column B- Account Name/Description
Column C- Debit (DR)
Column D- Credit(CR)
See below:
Screenshot of accounting entries in excelThe nature of accounting entries makes it as such that debit entries are left justified while credit entries are right justified (or indented). Is there a set of conditional formatting or excel formula to accomplish this? I ask this question setting aside the fact that I could set up a filter to take all the rows that contain values in column D and manually right justify/indent column B.
Lee RichardsonOwner & PresidentAsked:
Who is Participating?
 
Wayne Taylor (webtubbs)Connect With a Mentor Commented:
You can apply a custom number format with conditional formatting to the Account column.

Select the Account column data and add a new conditional formatting rule. Select formula and enter =D2<>"", where column D is the credit column and the data starts in Row 2. Select Format > Number and enter the format "    "@. You can adjust the indent level by adding spaces between the quotation marks.
0
 
Wayne Taylor (webtubbs)Commented:
Comment answers askers question.
0
All Courses

From novice to tech pro — start learning today.