ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Nesting formulas (https://www.excelbanter.com/excel-discussion-misc-queries/224638-nesting-formulas.html)

GARY

Nesting formulas
 
Currently, these formulas are in D1, E1, D2, E2, D3, E3, D4 and E4,
respectively:

=IF(LEFT(A1,1)="1",IF(LEFT(C1,1)="0",LEFT(C1,3)&MI D(C1,5,3),"000000"))
=IF(LEFT(A1,1)="1",IF(LEFT(C1,1)="0","0000000","0" &LEFT(C1,2)&MID
(C1,4,4)))


=IF(LEFT(A2,1)="6","000000","000000")
=IF(LEFT(A2,1)="6",IF(LEFT(C2,1)="0","0"&LEFT(C2,3 )&MID
(C2,5,3),"0"&LEFT(C2,2)&MID(C2,4,4)))


=IF(LEFT(A3,1)="1",IF(LEFT(C3,1)="0",LEFT(C3,3)&MI D(C3,5,3),"000000"))
=IF(LEFT(A3,1)="1",IF(LEFT(C3,1)="0","0000000","0" &LEFT(C3,2)&MID
(C3,4,4)))


=IF(LEFT(A4,1)="6","000000","000000")
=IF(LEFT(A4,1)="6",IF(LEFT(C4,1)="0","0"&LEFT(C4,3 )&MID
(C4,5,3),"0"&LEFT(C4,2)&MID(4,4,4)))


How can I create one formula by nesting each pair of formulas?






David Biddulph[_2_]

Nesting formulas
 
It isn't clear what you want to do with the nesting. You currently have one
result in D1 and a different result in E1. What result do you want, and in
which cell?

It also isn't clear why you have =IF(LEFT(A2,1)="6","000000","000000")
rather than just ="000000"

You might also note that you don't need the ,1 in the LEFT functions; it
defaults to ,1 if not otherwise spacified.
--
David Biddulph

GARY wrote:
Currently, these formulas are in D1, E1, D2, E2, D3, E3, D4 and E4,
respectively:

=IF(LEFT(A1,1)="1",IF(LEFT(C1,1)="0",LEFT(C1,3)&MI D(C1,5,3),"000000"))
=IF(LEFT(A1,1)="1",IF(LEFT(C1,1)="0","0000000","0" &LEFT(C1,2)&MID
(C1,4,4)))


=IF(LEFT(A2,1)="6","000000","000000")
=IF(LEFT(A2,1)="6",IF(LEFT(C2,1)="0","0"&LEFT(C2,3 )&MID
(C2,5,3),"0"&LEFT(C2,2)&MID(C2,4,4)))


=IF(LEFT(A3,1)="1",IF(LEFT(C3,1)="0",LEFT(C3,3)&MI D(C3,5,3),"000000"))
=IF(LEFT(A3,1)="1",IF(LEFT(C3,1)="0","0000000","0" &LEFT(C3,2)&MID
(C3,4,4)))


=IF(LEFT(A4,1)="6","000000","000000")
=IF(LEFT(A4,1)="6",IF(LEFT(C4,1)="0","0"&LEFT(C4,3 )&MID
(C4,5,3),"0"&LEFT(C4,2)&MID(4,4,4)))


How can I create one formula by nesting each pair of formulas?





All times are GMT +1. The time now is 05:44 AM.

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