Excel formulas

Discussion in 'Software' started by peterdw, Jun 12, 2009.

  1. peterdw

    peterdw Private E-2

    I have a spreadsheet in Excel 2007 which shows in column A a person's forename. In column C is the forename of their spouse\partner if they have one. Column D is their surname.

    I want to insert in column B an ampersand (&) if there is a name in column C but to leave it blank if there is no spouse\partner name in column C. So we should then see John (column A) & (column B) Jane (column C) Bull (column D).

    The spreadsheet has 180 lines so I want to insert a formula in column B which will give me the result above. I have tried various IF or IS statements but without success.

    Hope that someone has the answer.
     
  2. plodr

    plodr MajorGeek Super Extraordinaire Moderator Staff Member

    Sorry, I can't help. I have a workaround.
    Column A "first name" column B either blank or "& first name of spouse" Column C surname.
    Since the sheet will not print blank columns if nothing is in B then only column A and C will print.
    If the person has a spouse, column B with the & and name will print.
     
  3. peterdw

    peterdw Private E-2

    Hi Plodr,

    I have now found out the formula which is b =IF(C1="","","&").

    Thanks for your interest.
     
  4. plodr

    plodr MajorGeek Super Extraordinaire Moderator Staff Member

    Glad you found something. I don't use excel. But should I ever need something like this, hopefully I can find this thread.
     
  5. jewlzs

    jewlzs Corporal

    IF(ISNULL[COLUMN B],COLUMN A & " " COLUMN B, COLUMN A & " " "&" COLUMN B & " " COLUMN C)

    You needed to find the ISNULL and give it a if true result and a if false result.

    I can't verify this formula my excel is broken work with it the commas are important. tip click the column cell instead of typing it
     
  6. usafveteran

    usafveteran MajorGeek

    Is that the whole forumla? I think it makes no sense in relation to your requirement. I believe jewlzs is on the right track. Can you follow the logic of his formula?
     

MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds