Nesting formulas

G

GARY

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)&MID(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)&MID(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?
 
D

David Biddulph

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top