+ Reply to Thread
Results 1 to 8 of 8

Can the contents of a Cell be copied to another Cell by simple Hovering?

  1. #1
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Can the contents of a Cell be copied to another Cell by simple Hovering?

    Can the contents of a Cell be copied to another Cell by simple Hovering?

    Dear Forum,

    I am no VBA Expert but follow the logics very well if a File's attached..with some comments.

    Now, the requirement is that I have sesveral HEADERS that is going to be horizontally placed from Columns A till Q.. Lets say with the name of Different Processes.

    And I have the Database below this Headers form Row 3 till Row 103..

    Now lets say these Headers containing the Different Processes are present from A1 till Q1 and I want to simply Hover over any of these headers and want the contents copied in cells B3 onwards till B103.

    Now i know that we can use a Dropdown, howeer this has to be done fast and if this is possible via VBA I will happy to use this feature,,

    The way it would work is if I am hovering my Mouse over Cell A1 which has the Process of "Research" then this text should get copied to the Cell B3 which is already SELECTED prior to hovering...
    The values should be copied to only clolumn 2 i.e B3 till B103..

    I am not sure but hope this is possible through VBA..

    Warm Regards
    e4excel
    Last edited by e4excel; 04-30-2010 at 06:09 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Can the contents of a Cell be copied to another Cell by simple Hovering?

    There is no mouse-over event with cells etc...
    Moreover I would say that physically altering the content of the sheet by virtue of moving the mouse is a very risky approach - far better to rely on a very deliberate action on the part of the end-user.

    If the copy range is constant (B3:B103) then why not use say a Double Click event on A1:Q1 ?

    Please Login or Register  to view this content.
    To insert the above, right click on sheet of interest select View Code and paste into resulting window.

    Thereafter in a macro enabled file - double clicking on any cell in range A1:Q1 will populate B3:B103 with that value.

  3. #3
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Can the contents of a Cell be copied to another Cell by simple Hovering?

    Thanks DonketOte,

    I like this approach a lot and its very easy to use as i m not exposed to VBA could not even think about this..

    But theonly issue is that all the Cells from range B3 till B103 get filled with the same entry however my requirement was to get an different entries like for example..

    Let say, I was talking in my scenario...
    I have selected the Cell B3 and then click or hover on cell A1 which has Research stored then that should get copied to cell B3, however now I select the cell lets say B10 then I click or hover cell E1 containing Vendor Management then that should get copied to Cell B!0 without any changes in the earlier cells in the column B..

    Now I dont know really what Event or what can make this work..!

    But I like your approach and if that could give this Usability it would winning the war as half the battle has already been won..
    Last edited by e4excel; 04-30-2010 at 05:20 AM.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Can the contents of a Cell be copied to another Cell by simple Hovering?

    I confess I interpreted the first quote below (from OP) as meaning the range was to be filled in full

    Quote Originally Posted by e4excel
    I want to simply Hover over any of these headers and want the contents copied in cells B3 onwards till B103
    Quote Originally Posted by e4excel
    the only issue is that all the Cells from range B3 till B103 get filled with the same entry
    based on the latter quote this is seemingly not the case.

    The issue with the double click event is that only a single cell is ever active at any given time (ie if header is active B? is not and vice-versa) so based on your last request it's not really viable IMO.

    I'd also make the point that the act of navigating between Bn and header row on a cell by cell basis would be just as slow as entering manually, no ?

    On that basis I confess I'm not really sure I see the value in adopting any VBA based approach esp. when you consider the fact that you can update multiple cells in a given selection simultaneously by holding CTRL when pressing ENTER (ie you don't need to update on a cell by cell basis necessarily).

    If you're adamant that you do want a VBA solution then let us know.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Can the contents of a Cell be copied to another Cell by simple Hovering?

    I suppose... if you really wanted to you could use the RightClick event but it's still not ideal.

    Replacing the prior code (in full) with:

    Please Login or Register  to view this content.
    you should find that if you highlight the cells you want to update in B3:B103 and then whilst holding CTRL select the appropriate header value and then right click on the mouse the B values will update accordingly.
    (if either no header value is selected or no valid cells in B3:B103 are selected the right click event will cancel)

    To reiterate though - this is very odd approach...

  6. #6
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Can the contents of a Cell be copied to another Cell by simple Hovering?

    Dear DonkeyOte,

    I am really sorry asI was not clear in explaining my requirement correctly..
    Its just that my net speed is so slow that I trype fast however it does not catch all the letters and also miss some words.

    As u must have observed from certain words there are a lot of Spelling mistakes too..

    Howeere..

    Anyways, I think the last option is the most workable but can the CTRL button functionality not be used as still have the same impact..

    If its possible fine, otherwise still this is really good to go...as always any solution from you dear DO...

    If you're adamant that you do want a VBA solution then let us know.
    I am actually more conversant with formulas however I m not sure that these kind of requirements can be fulfilled with just Formulas,, and therefore have to resort to VBA whre my knowledge is ZILCH...

    Thanks a lot, if theres an iota of a possibility to make it just 2 Clicks its fine otherwise I reiterate this should do the trick..

    Warm Regards
    e4excel.

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Can the contents of a Cell be copied to another Cell by simple Hovering?

    Quote Originally Posted by e4excel
    Anyways, I think the last option is the most workable but can the CTRL button functionality not be used as still have the same impact..
    Not really - if you want to select non-contiguous ranges you would need to use CTRL.

    If you want to avoid selecting both header and target range simultaneously then you would need to use additional events to "store" the address of the prior range at all times.
    This would be required given that as and when the header is selected that is the active cell (the prior / target range for this value is then unknown)

    I'm not saying you couldn't do it simply that from my perspective at least it would not be worth it ...
    (you would need to compose logic in terms of handling which range was selected first and / or both ranges selected simultaneously etc...)

    There are ways around the mouse over event but they generally necessitate addition of Controls (eg transparent labels) that sit over the cells - and again for the scope of the project I'm not sure it's worthwhile going down that route either.

  8. #8
    Registered User
    Join Date
    11-03-2008
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    2,521

    Re: Can the contents of a Cell be copied to another Cell by simple Hovering?

    Quote Originally Posted by DonkeyOte View Post
    Not really - if you want to select non-contiguous ranges you would need to use CTRL.

    If you want to avoid selecting both header and target range simultaneously then you would need to use additional events to "store" the address of the prior range at all times.
    This would be required given that as and when the header is selected that is the active cell (the prior / target range for this value is then unknown)
    I had the same thing in my mind to be able to store the last selected Cell Address and then use it for getting populated..

    But dont know how to do that? if its possible can we do that? Actually thoug the requirement looks simple but iof this works then I can actually add a lot of dimensions to this Application which Im making as other things also can be made Multiple connected based on the same logic and it will faster to check the data rather than using the Dropdowns..

+ 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