# Thread: Creating formula based on if data is correct in cell

1. ## Creating formula based on if data is correct in cell

Hi everyone- I'm having a problem with a formula for work. Attached is a simplified version of my problem.

My job is to find the %s of all insured cars, based on two different types of insurance. However, one insurance (type A) runs out before the other, and when that happens we use a forecasted/projected amount. I created a simple IF formula to show the insured % amounts for the next three months. If theres a value in type A insurance, use total insured cars/total cars. If there isn't a value in Type A, use total insured cars/total cars + forecast A. This formula breaks down in the months of Sept and Oct (if you look at the comments in the attached wrkbook).

Thanks for any and all help!  Reply With Quote

2. Hi MattMurdock,
In cell J16, try this:
Code:
`=IF(OR(J3="",K3="",L3=""),SUM(J14:L14)/SUM(J13:L13,J15:L15),SUM(J14:L14)/SUM(J13:L13))`  Reply With Quote

3. Originally Posted by CheshireCat Hi MattMurdock,
In cell J16, try this:
Code:
`=IF(OR(J3="",K3="",L3=""),SUM(J14:L14)/SUM(J13:L13,J15:L15),SUM(J14:L14)/SUM(J13:L13))`
Great thank you I think this should work!  Reply With Quote

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•