+ Reply to Thread
Results 1 to 9 of 9

Clearing contents of adjacent cell.

  1. #1
    Forum Contributor
    Join Date
    10-16-2012
    Location
    Brooklyn
    MS-Off Ver
    Excel 2010 PC
    Posts
    137

    Clearing contents of adjacent cell.

    Hey, I'm trying to clear the contents of a cell, based off of the contents of another cell.

    I'm trying to work out a function like this: (IN CELL B2)

    "=IF(LEN(C2)>5,Clearcontents(A2),"")"

    I'd like to delete the contents of A2 if the length of C2 is over 5...or contains a ".".
    I thought "clearcontents" might work b/c that phrase works in VBA.
    Is there a function to get this done?

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,936

    Re: Clearing contents of adjacent cell.

    You can't use a formula in one cell to modify the contents of another.
    Ben Van Johnson

  3. #3
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Clearing contents of adjacent cell.

    If using VBA is not an option, then this will work (kind of)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    =IF(LEN(C2)>5,"",[some sort of formula])
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Regards

    Alastair

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Clearing contents of adjacent cell.

    Quote Originally Posted by aydeegee View Post
    If using VBA is not an option, then this will work (kind of)
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    =IF(LEN(C2)>5,"",[some sort of formula])
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Really the above will work?


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  5. #5
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Clearing contents of adjacent cell.

    Does for me.

    Regards

    Alastair
    Attached Files Attached Files

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Clearing contents of adjacent cell.

    @ aydeegee,

    Please read the OP's description once again, since OP expecting B2 cell formula should clear A2 cell content

  7. #7
    Valued Forum Contributor
    Join Date
    09-25-2011
    Location
    Eastbourne, England
    MS-Off Ver
    Excel 2010
    Posts
    1,089

    Re: Clearing contents of adjacent cell.

    Ok - you're right - I thought that I had covered with the "sort of" !

    Alastair

  8. #8
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,788

    Re: Clearing contents of adjacent cell.

    It happens many times to me as well, but I go through the description twice when the MASTERS says NO

  9. #9
    Forum Contributor
    Join Date
    10-16-2012
    Location
    Brooklyn
    MS-Off Ver
    Excel 2010 PC
    Posts
    137

    Re: Clearing contents of adjacent cell.

    "[some sort of formula]", yea thanks, I was asking if there is an actual function that will delete another cell.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1