# Quick Excel question

**URL:** <https://boards.straightdope.com/t/quick-excel-question/715066>\
**Category:** Factual Questions\
**Created:** [March 15, 2015, 9:40pm UTC](https://boards.straightdope.com/t/quick-excel-question/715066 "2015-03-15T21:40:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Enderw24](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@Enderw24](https://boards.straightdope.com/u/Enderw24)\
**Post date:** [March 15, 2015, 9:40pm UTC](https://boards.straightdope.com/t/quick-excel-question/715066/1 "2015-03-15T21:40:03Z")

</div>

Suppose I have a spreadsheet with four cells in it: a1, b1, c1 and d1.

I want D1 to copy what’s been written in c1. But if that’s empty, copy what’s in b1. If that’s empty, copy what’s in a1. And if that’s empty, leave itself blank.

I’ve managed to use the ifblank command to get a copy of a single cell, but I can’t figure out how to combine that with the contingency plan of moving to another cell upon encountering a blank space.

Any help?

Thanks!

---

<div class="post-metadata">

**Author:** ![Typo\_Knig](https://avatars.discourse-cdn.com/v4/letter/t/cdc98d/32.png) [@Typo\_Knig](https://boards.straightdope.com/u/Typo_Knig)\
**Post date:** [March 15, 2015, 9:52pm UTC](https://boards.straightdope.com/t/quick-excel-question/715066/2 "2015-03-15T21:52:30Z")

</div>

Nested ifblanks: Cell D1 =ifblank(c1,ifblank(b1,ifblank(a1,"",a1),b1),c1) I’ve had better luck with if(len(c1)=0 rather than ifblank(c1,… But that may be me.

---

<div class="post-metadata">

**Author:** ![Peter\_Morris](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/peter_morris/32/359_2.png) [@Peter\_Morris](https://boards.straightdope.com/u/Peter_Morris)\
**Post date:** [March 15, 2015, 10:04pm UTC](https://boards.straightdope.com/t/quick-excel-question/715066/3 "2015-03-15T22:04:38Z")

</div>

=if(a3="",if(a2="",a1,a2),a3)

---

<div class="post-metadata">

**Author:** ![Enderw24](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@Enderw24](https://boards.straightdope.com/u/Enderw24)\
**Post date:** [March 15, 2015, 10:29pm UTC](https://boards.straightdope.com/t/quick-excel-question/715066/4 "2015-03-15T22:29:18Z")

</div>

Thank you both for the quick replies.

**Peter Morris** , I put yours in first because it was shorter. I tested it out and it works exactly like I need it to. Thanks!

---

<div class="post-metadata">

**Author:** ![Peter\_Morris](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/peter_morris/32/359_2.png) [@Peter\_Morris](https://boards.straightdope.com/u/Peter_Morris)\
**Post date:** [March 15, 2015, 10:54pm UTC](https://boards.straightdope.com/t/quick-excel-question/715066/5 "2015-03-15T22:54:22Z")

</div>

You’re welcome.

Tell me, is three rows going to be enough, or will you need to extend it to an arbitrary number? I can do that too, if needed.

---

<div class="post-metadata">

**Author:** ![Enderw24](https://avatars.discourse-cdn.com/v4/letter/e/ba9def/32.png) [@Enderw24](https://boards.straightdope.com/u/Enderw24)\
**Post date:** [March 16, 2015, 2:14am UTC](https://boards.straightdope.com/t/quick-excel-question/715066/6 "2015-03-16T02:14:11Z")

</div>

No. I’m creating a quarterly spreadsheet full of contracts. So I’ll only need three months and then a quarterly tabulation. But sometimes, things aren’t filled in on the last month of the quarter, so the cell needs to pull from a previous spreadsheet.

So long story short, three is just fine. It seems to be working perfectly.
