Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - IF/THEN type statement

Status
Not open for further replies.

matpj

Technical User
Mar 28, 2001
687
GB
Hi,
I have 3 columns in my spreadsheet.
what I need to do is fill out the thirs column based on the contents on the other two.

basically, if there is an entry in the 1st OR the 2nd column then the third column should read the same
If there is an entry in the 1st AND 2nd Column, then the third column should just read the same as the first column.

is this possible??
can anyone tell me how?
thanks
Matt
 
Maybe You shouls try this formula in the 3d cell: =IF((A1<>&quot;&quot;);A1;(IF(B1<>&quot;&quot;;B1;&quot;Nothing&quot;)))

It's working like this:
If the first cell is empty(A1) then check the second cell(B1). If the second cell i empty, then write &quot;nothing&quot;, but if there is anything in the first cell, write the same as the first cell. Was it this you meant?? I'm not sure what you were meaning, but this works when putting the formula in C1....
 
Hi matpj,

Try ..

=IF(A1=&quot;&quot;,B1,A1)

.. on row 1 and then copy down. If A1 is empty, it copies B1 (if that's also empty it copies nothing); otherwise it copies A1 (because you want that if it's there regardless of B1).

Enjoy,
Tony
 
=IF(AND(A1<>&quot;&quot;,B1<>&quot;&quot;),A1,IF(A1=&quot;&quot;,B1,A1))



Blue [dragon]

If I wasn't Blue, I would just be a Dragon...
 
great! it works liek a charm - thank you!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top