+ Reply to Thread
Results 1 to 5 of 5

ActiveCell in selected Range

  1. #1
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Poland
    MS-Off Ver
    MS Office 365
    Posts
    174

    ActiveCell in selected Range

    Hi,

    I try to create my own function, which get values from two cells:

    Please Login or Register  to view this content.
    This code works, but I need to write this function manually in every cell.

    When I write
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    for example into cell C6 and try to copy it from C6 to G10 it does not work correctly because ActiveCell.Row and ActiceCell.Column are still the same (ActiveCell does not change when I select several cells).

    How can I change my code?

  2. #2
    Valued Forum Contributor
    Join Date
    12-22-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    532

    Re: ActiveCell in selected Range

    please try :
    quantity = Cells(row(),2).Value
    price = Cells(5, column()).Value

  3. #3
    Valued Forum Contributor
    Join Date
    12-22-2015
    Location
    HK
    MS-Off Ver
    2010
    Posts
    532
    Quote Originally Posted by ikboy View Post
    please try :
    quantity = Cells(row(),2).Value
    price = Cells(5, column()).Value
    Sorry, amend to ...application.row()

  4. #4
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Poland
    MS-Off Ver
    MS Office 365
    Posts
    174

    Re: ActiveCell in selected Range

    Please Login or Register  to view this content.
    does not work

  5. #5
    Forum Contributor
    Join Date
    07-13-2015
    Location
    Poland
    MS-Off Ver
    MS Office 365
    Posts
    174

    Re: ActiveCell in selected Range

    from polish forum:

    Please Login or Register  to view this content.

    works great !

+ 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. Offset selection based on selected cells not just activecell
    By sabin348 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-28-2015, 12:20 PM
  2. Copying an activecell range and pasting to another activecell range
    By Londonbound in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-12-2014, 07:41 AM
  3. [SOLVED] write selected items to activecell of a given column
    By Datas in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-28-2013, 01:28 AM
  4. [SOLVED] Use ActiveCell as Range
    By 55horses in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-10-2012, 12:13 AM
  5. Output contents of Activecell when Activecell may be string or numeric.
    By jfriddle in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-09-2012, 12:27 PM
  6. Range of the ActiveCell
    By escelinen in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-13-2007, 08:14 AM
  7. Name of range containing ActiveCell?
    By Ed in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-03-2005, 09: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