## [Solved] Fill Cell On Condition

### [Solved] Fill Cell On Condition

Let me start of by saying that I'm a bit of a newbie to spreadsheet programs. I'm trying to get something to work but after a couple of hours searching the internet I havent got it working. Perhaps I'm looking in the wrong places but I hope someone here can help me out. Here is my scenario:

I have three cells A, B and C. What I would like is that if there is a letter x in cell C, Cell A and B are to be filled with values from a different tab. Is cell C empty then cells A and B should be empty as well.

Hopefully someone can help me out with this ...
Last edited by Hagar Delest on Tue Jun 10, 2008 2:22 pm, edited 2 times in total.
Reason: tagged the thread as Solved.
Glitch

Posts: 2
Joined: Sun Jan 20, 2008 1:50 pm

### Re: Fill Cell On Condition

Glitch wrote:I have three cells A, B and C. What I would like is that if there is a letter x in cell C, Cell A and B are to be filled with values from a different tab. Is cell C empty then cells A and B should be empty as well.

OK, if you have a spreadsheet with 2 tables/sheets put in the following:

Sheet1
Cell A1: 1
Cell B1: A
Cell A2: 2
Cell B2: B
Cell A3: 3
Cell B3: C

Sheet2
Cell A1: =IF(C1="x";Sheet1.A1;"")
Cell B1: =IF(C1="x";Sheet1.B1;"")
Cell C1: x
Cell A2: =IF(C2="x";Sheet1.A2;"")
Cell B2: =IF(C2="x";Sheet1.B2;"")
Cell C2:
Cell A3: =IF(C3="x";Sheet1.A3;"")
Cell B3: =IF(C3="x";Sheet1.B3;"")
Cell C3: x
OOo 3.2.0 on Ubuntu 10.04 • OOo 3.2.1 on Windows 7 64-bit and MS Windows XP
hol.sten
Volunteer

Posts: 495
Joined: Mon Oct 08, 2007 1:31 am
Location: Hamburg, Germany

### Re: Fill Cell On Condition

I have three cells A, B and C. What I would like is that if there is a letter x in cell C, Cell A and B are to be filled with values from a different tab. Is cell C empty then cells A and B should be empty as well.

No spreadsheet program works like this, which is the reason why you could not find a solution.
There are input cells having constant values imported or entered. A constant value is either one of text or number. Unless you don't use the application as a plain table editor, you add formula cells to process your input data. What the formula cells show is the output of your "program" and may be processed further by subsequent formula cells. The result of a formula cell is either one of text or number unless it is an error. You've got to understand the issue of absolute vs. relative referencing in order to utilize spreadsheets successfully. All this belongs to a set of common rules, shared by all spreadsheet programs since the early 90ies.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04, no OpenOffice, LibreOffice 6.4

Villeroy
Volunteer

Posts: 28851
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

### Re: Fill Cell On Condition

hol.sten wrote:OK, if you have a spreadsheet with 2 tables/sheets put in the following:

Thanx ... exactly what I was looking for. Strangely I had to translate IF to my own language (ALS) to get it to work. Not very handy that formulas are localized if you ask me but I'll keep it in mind ...
Glitch

Posts: 2
Joined: Sun Jan 20, 2008 1:50 pm