+ Reply to Thread
Results 1 to 5 of 5

How can i compair the position of the active cell with another?

  1. #1
    Registered User
    Join Date
    05-25-2010
    Location
    V
    MS-Off Ver
    Excel 2003
    Posts
    18

    Question How can i compair the position of the active cell with another?

    Hello all,

    Could you please assist me?

    I am writing a macro and i need to compare the position of the active cell to the position of the cell with the minimum value for every row.So i need to write something like this:

    If ActiveCell.Address = to the Cell(with the minimum value in range B3:Y3) .Address Then
    Do you have any idea how i could do this??

    Thank you in advance
    Last edited by EXCELOST; 12-06-2010 at 02:45 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: How can i compair the position of the active cell with another?

    By "position", do you mean row or column? For example:
    Please Login or Register  to view this content.

  3. #3
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: How can i compair the position of the active cell with another?

    Woops.. brain failure there. Comparing min value to column position. Updated code:
    Please Login or Register  to view this content.

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: How can i compair the position of the active cell with another?

    Or this?
    Please Login or Register  to view this content.
    There must be at least one numeric value in C3:Y3
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  5. #5
    Registered User
    Join Date
    05-25-2010
    Location
    V
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: How can i compair the position of the active cell with another?

    Thank you so much both of you!! I have used Paul's macro as it fits like a glove to what i wanted to do with the If, ElseIf, Else!!
    But i will try also yours Marcol to see how it works!

    Thank you once again guys! You made my day!!!

+ 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