+ Reply to Thread
Results 1 to 2 of 2

Change formula reference by clicking on a cell.

  1. #1
    Registered User
    Join Date
    02-27-2014
    Location
    Lithuania, Klaipeda
    MS-Off Ver
    Excel 2013
    Posts
    96

    Change formula reference by clicking on a cell.

    I have a simple formula:
    =DATE(YEAR(A1)-B1,MONTH(A1),DAY(A1))
    In formula I would like to change B1 reference only by clicking on certain B:B value.
    The reason: I want to have only one cell with above formula. But I need it to be dynamical in order to check new value upon request.
    Is it possible to do something like this?
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    01-14-2013
    Location
    Austria
    MS-Off Ver
    2016 / 2019
    Posts
    339

    Re: Change formula reference by clicking on a cell.

    This will only work if the data in B:B is an integer! In your sample file it is always x.5.
    If you know that is alwys some years and half a year then you have to change your formula to
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    or better if other fractions should be allowed (and remainingdays ignored)
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Then you have to convert .xlsx to .xlsm and add the event "Worksheet_SelectionChange" as I did in the attachment

    cheers
    Attached Files Attached Files

+ 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. How to change a tab name with cell reference and formula?
    By Jared in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-19-2018, 07:10 PM
  2. need to change a cell reference within formula
    By abelle82 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-19-2016, 04:18 PM
  3. Replies: 1
    Last Post: 02-11-2015, 01:56 PM
  4. Replies: 1
    Last Post: 02-03-2015, 06:44 AM
  5. Dragging formula, change sheet reference, but not cell reference
    By Kalilaya0419 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-13-2013, 04:50 PM
  6. Change Yes/No value by clicking on cell
    By fusion007 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-23-2011, 04:11 AM
  7. Change color of a cell by just clicking on it?
    By Falantar in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-25-2009, 09:18 AM

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