![]() |
IF function results to include both text and cell value
I have a database with over 25,000 names and addresses. I'm using Excel 2007
to edit it. I am setting up a mail merge in Word 2007. Unfortunately, when the database was set up, cells in the column titled "PO Box" contain only the box number. When I merge, I get only a number. I need the label to read "PO Box xxxx". I decided to set up a column in my database to add "PO Box" in front of the number in the cell. (That is D1 value of 73 becomes E1 - PO Box 73. I am using the IF function to decide if a cell has a number, and if it does have a number, result would be "PO Box" with the cell value. If cell does not have a box number, the cell would be left empty. I can make it work with the text "PO Box" and I can make it work with just the cell value. I cannot make it work with both. I hope someone can help me with this. This is what I tried: =IF(D10,"PO Box "D1,"") What do I need to add to this to make it work? Sorry, I don't work at all with formulas, so could be way off base here and probably am not making this very clear. |
IF function results to include both text and cell value
=IF(ISNUMBER(D1),"PO Box "&D1,"")
"Helene" wrote: I have a database with over 25,000 names and addresses. I'm using Excel 2007 to edit it. I am setting up a mail merge in Word 2007. Unfortunately, when the database was set up, cells in the column titled "PO Box" contain only the box number. When I merge, I get only a number. I need the label to read "PO Box xxxx". I decided to set up a column in my database to add "PO Box" in front of the number in the cell. (That is D1 value of 73 becomes E1 - PO Box 73. I am using the IF function to decide if a cell has a number, and if it does have a number, result would be "PO Box" with the cell value. If cell does not have a box number, the cell would be left empty. I can make it work with the text "PO Box" and I can make it work with just the cell value. I cannot make it work with both. I hope someone can help me with this. This is what I tried: =IF(D10,"PO Box "D1,"") What do I need to add to this to make it work? Sorry, I don't work at all with formulas, so could be way off base here and probably am not making this very clear. |
IF function results to include both text and cell value
=IF(D10,"PO Box "& D1,"")
Gord Dibben MS Excel MVP On Tue, 27 Oct 2009 13:01:01 -0700, Helene wrote: I have a database with over 25,000 names and addresses. I'm using Excel 2007 to edit it. I am setting up a mail merge in Word 2007. Unfortunately, when the database was set up, cells in the column titled "PO Box" contain only the box number. When I merge, I get only a number. I need the label to read "PO Box xxxx". I decided to set up a column in my database to add "PO Box" in front of the number in the cell. (That is D1 value of 73 becomes E1 - PO Box 73. I am using the IF function to decide if a cell has a number, and if it does have a number, result would be "PO Box" with the cell value. If cell does not have a box number, the cell would be left empty. I can make it work with the text "PO Box" and I can make it work with just the cell value. I cannot make it work with both. I hope someone can help me with this. This is what I tried: =IF(D10,"PO Box "D1,"") What do I need to add to this to make it work? Sorry, I don't work at all with formulas, so could be way off base here and probably am not making this very clear. |
All times are GMT +1. The time now is 07:18 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com