+ Reply to Thread
Results 1 to 3 of 3

How do I make one cell blank if another cell has data in it and vice-versa?

  1. #1
    Registered User
    Join Date
    01-06-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    2

    Question How do I make one cell blank if another cell has data in it and vice-versa?

    Hi,

    I'm new to the forum today so, first off, hello! I'm hopeful that someone here can help me sort a small issue that I feel like i should be able to solve but for some reason i have not found a good solution so far.

    I have created a resource request form in Excel 2010 and on it I need the requestor completing the form to specify how long they are requesting the resource for. To do this they can either enter the duration they will need the resource for as a total number of days or they can specify an end date. I would ideally like a macro that restricts the user so they can only enter data into one or other of the two cells (End date = C15, Duration = C16). If they try and enter data into both cells then the data is only kept in the last cell updated.
    e.g.
    If C15 contains an end date and the duration in C16 is left blank, this is fine. However, if they then try and enter a duration in C16 without deleting the end date in C15 then C15 would be made blank and vice versa.

    I hope this description is clear and one of you can help me to get this to work.

    Thanks

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: How do I make one cell blank if another cell has data in it and vice-versa?

    Maybe use data validation, for example, for the data validation (choose custom) in C15 put something like:
    =IF(C16<>"",0,"<>"&0)
    and then likewise in C15

  3. #3
    Registered User
    Join Date
    01-06-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: How do I make one cell blank if another cell has data in it and vice-versa?

    Thanks Yudlugar, this is not quite what I envisaged initially but it works a treat all the same.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA code to change info in one cell so that other cell changes, and vice versa
    By tarab in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-21-2016, 12:57 PM
  2. [SOLVED] Make value in cell A1 dependant on value in cell B1 and vice versa
    By tanktata in forum Excel General
    Replies: 9
    Last Post: 03-29-2012, 06:11 PM
  3. Prevent data entry in cell A1 if there is data in a cell B1 and vice versa
    By westonkw in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-22-2008, 12:29 PM
  4. Page name from cell or vice versa
    By Audiguy82 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-19-2008, 06:21 PM
  5. [SOLVED] How do I reference a worksheet name in a cell, or vice versa?
    By ilmeaz in forum Excel General
    Replies: 3
    Last Post: 05-02-2005, 04:06 PM

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