ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   About this forum (https://www.excelbanter.com/about-forum/)
-   -   Formula with three conditions (https://www.excelbanter.com/about-forum/445705-formula-three-conditions.html)

lucianir

Formula with three conditions
 
1 Attachment(s)
Hi gurus, I just need help from you, I am working with a journal entry template, I want that posting key cell will (cells A1:A43) will be populated when amounts are entered in cells D1:D43, when value in Cell D1 is positive amount, cell A1 will be “40”, if D1 is negative amount, cell A1 will be “50”, it sound easy, but there are two additional conditions:
1. One of them is related cells (C1:C43), it can be blank or be entered a text of 1 character, C1 itself does not change the posting key in A1, but C1 combined with D1 if change A1, I mean when D10 and C1<””, then A1=”09” if D1<0 and C1<””, then A1=”19”. I mean A1 will be “09” or “19” when C1<””, not dependency of Cell B1. I did a formula as follow and works perfectly: =IF(D1<””,(IF((AND(C1=””),(IF(D10,”40”,”50”)),(I F(AND(C1<””,D10),”09”,”19”)))),””)
2. Last condition is related to cell B1 (General ledger account), they can have a LEN of 6 characters and only have dependency of D1 (not dependency of cell C1), in this case if D10 and LEN B1=6, then A1=”40”, if not A1=”50”. If C1<6 and D10, A1=”24”, if not A1=”34”. I did a formula for this statement as follow: =IF(D1<””,(IF(AND(LEN(B1)6),(IF(D10,”24”,”34”)) ,(IF(AND(LEN(B1)<””,D10),”40”,”50”)))),””).
Now I want to combine these two formulas, so far I have cannot to do it because I think there is a conflict of result. Can you look at a solution for me?


All times are GMT +1. The time now is 10:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com