+ Reply to Thread
Results 1 to 10 of 10

Double-click macro to produce different results based on different cell ranges

  1. #1
    Registered User
    Join Date
    03-05-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    10

    Double-click macro to produce different results based on different cell ranges

    Is this possible?

    Todays date to appear in column A when double clicked. And a "y" to appear in column B if double clicked.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Double-click macro to produce different results based on different cell ranges

    Right click on the sheet where you need the code to run and select View code. Copy this code over -
    Please Login or Register  to view this content.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    03-05-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Double-click macro to produce different results based on different cell ranges

    Many thanks

    However, how do I start the range from say A6, so that A1:A5 are unaffected?

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Double-click macro to produce different results based on different cell ranges

    Updated code
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    03-05-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Double-click macro to produce different results based on different cell ranges

    Once again many thanks.
    However, is it possible to change the "y" to "yy" with another double click. And can the range be from A6 to A20?

  6. #6
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Double-click macro to produce different results based on different cell ranges

    Your requirements are increasing post by post

    What about the "y" in column B?

  7. #7
    Registered User
    Join Date
    03-05-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Double-click macro to produce different results based on different cell ranges

    I do apologies.
    I meant the "y" in column B to be "yy". And the range for column A and B to be A6 to A20 and B6 to B20?

    Many thanks for your time.

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Double-click macro to produce different results based on different cell ranges

    Updated code
    Please Login or Register  to view this content.
    Everything remains the same. You just had to change the y to yy.

  9. #9
    Registered User
    Join Date
    03-05-2013
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    10

    Re: Double-click macro to produce different results based on different cell ranges

    Sorry. I meant the "y" to appear on the first double-click and convert to a "yy" on the second double click?

  10. #10
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Double-click macro to produce different results based on different cell ranges

    Updated code
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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