Hello
Information:
Excel with data (amounts and text) from column A to AQ.
Columns needed for the forumla are:
Column C [Document Type] with text or empty
Column X [FA Posting Category] with text or empty
Column Y [FA Posting Type] with text or empty
Column AC[FA Entry Type] with text "Fixed Assets" or empty
The formula I need is:
=IF(X2="Disposal";IF(Y2="Invoice";X2;"Liquidation");Y2)
I want VBA to insert that formula in all rows where column AC [FA Entry type]="Fixed Assets" (or alternatively add one more condition i.e. if(AC="Fixed Assets";below formula;"")
I tried using this one but it doesnt work.
Sub Test()
Dim Rng As Range
Columns("AR:AR").Insert
Set Rng = Range("AR2:AR" & Range("B2").End(xlDown).Row)
Rng.FormulaR1C1 = "=IF(X2="Disposal";IF(Y2="Invoice";X2;"Liquidation");Y2)"
End Sub
Bookmarks