+ Reply to Thread
Results 1 to 21 of 21

Draw an arrow equal the size of the selected cells

  1. #1
    Forum Contributor
    Join Date
    09-13-2008
    Location
    Los Angeles, CA
    MS-Off Ver
    365
    Posts
    120

    Draw an arrow equal the size of the selected cells

    I want to select some cells (like A2-A20) and have it draw an arrow down the selected cells. Tried a few different things, none of which worked...

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    What did you try?

    Did you try recording a macro to see how the end points of a line are specified?

    Did you look at the Top, Left, Height and Width properties of the Range object?

  3. #3
    Forum Contributor
    Join Date
    09-13-2008
    Location
    Los Angeles, CA
    MS-Off Ver
    365
    Posts
    120
    I tried recording. the recording didn't seem to capture the drawing of the arrow at all in the code.

    I also tried something like this:

    Please Login or Register  to view this content.
    and no go.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    That's not the code you got when you recorded adding an arrow, was it? It's not what I get ...

  5. #5
    Forum Contributor
    Join Date
    09-13-2008
    Location
    Los Angeles, CA
    MS-Off Ver
    365
    Posts
    120
    Quote Originally Posted by shg View Post
    That's not the code you got when you recorded adding an arrow, was it? It's not what I get ...
    I didn't get ANY code when adding an arrow...

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    What version of Excel?

    Here's what I get:

    Please Login or Register  to view this content.
    Which I edited to:
    Please Login or Register  to view this content.

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello koticphreak,

    This macro will add a Down Arrow to the selected range of cells, center it and make it yellow. The range is restricted to being one column wide.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  8. #8
    Forum Contributor
    Join Date
    09-13-2008
    Location
    Los Angeles, CA
    MS-Off Ver
    365
    Posts
    120
    Quote Originally Posted by Leith Ross View Post
    Hello koticphreak,

    This macro will add a Down Arrow to the selected range of cells, center it and make it yellow. The range is restricted to being one column wide.

    CODE

    Sincerely,
    Leith Ross
    This works great, except I'm having a bit of trouble doing 2 things with it that I thought would be fairly easy but... not so much. I would now like to put a String in the first cell of the selection and have the arrow not start until the next cell.

    Also, I'm trying to figure out how to change the arrow to have an Open Arrow end type. I figure it has to do with the DownArrow.Line.Style function, but I can't find it.

  9. #9
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello koticphreak,

    I am not sure what you mean by "open ended", but here is the change to start the arrow below the first cell.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  10. #10
    Forum Contributor
    Join Date
    09-13-2008
    Location
    Los Angeles, CA
    MS-Off Ver
    365
    Posts
    120
    Quote Originally Posted by Leith Ross View Post
    Hello koticphreak,

    I am not sure what you mean by "open ended", but here is the change to start the arrow below the first cell.

    CODE

    Sincerely,
    Leith Ross
    You can have a closed aarow or an open one, its an end style, could be something only in 2007, not sure.

  11. #11
    Forum Contributor
    Join Date
    09-13-2008
    Location
    Los Angeles, CA
    MS-Off Ver
    365
    Posts
    120
    Quote Originally Posted by Leith Ross View Post
    Hello koticphreak,

    I am not sure what you mean by "open ended", but here is the change to start the arrow below the first cell.

    CODE

    Sincerely,
    Leith Ross
    Im still having trouble trying to select the first cell of the range to input a string into...

  12. #12
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434
    post an example workbook with the arrow position and formatted as requried.
    Cheers
    Andy
    www.andypope.info

  13. #13
    Forum Contributor
    Join Date
    09-13-2008
    Location
    Los Angeles, CA
    MS-Off Ver
    365
    Posts
    120
    Quote Originally Posted by Andy Pope View Post
    post an example workbook with the arrow position and formatted as requried.
    Attached is what I'd like. Thanks!
    Attached Files Attached Files

  14. #14
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434
    Please Login or Register  to view this content.

  15. #15
    Forum Contributor
    Join Date
    09-13-2008
    Location
    Los Angeles, CA
    MS-Off Ver
    365
    Posts
    120
    Thanks! That works great for changing the arrow to be exactly how I wanted, but how would I modify that to put a characters in the first cell of the selection?

  16. #16
    Forum Contributor
    Join Date
    09-13-2008
    Location
    Los Angeles, CA
    MS-Off Ver
    365
    Posts
    120
    If someone could just point me in the right direction to select the first cell in the range, I could figure out the rest on my own... THANKS!

  17. #17
    Forum Contributor
    Join Date
    09-13-2008
    Location
    Los Angeles, CA
    MS-Off Ver
    365
    Posts
    120
    this is what i added to it, but its not working...

    Please Login or Register  to view this content.
    What am I doing wrong to make it select the first cell and type in it?

  18. #18
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434
    You would add this line before resizing the range for the arrow.
    Please Login or Register  to view this content.

  19. #19
    Forum Contributor
    Join Date
    09-13-2008
    Location
    Los Angeles, CA
    MS-Off Ver
    365
    Posts
    120
    Quote Originally Posted by Andy Pope View Post
    You would add this line before resizing the range for the arrow.
    Please Login or Register  to view this content.

    wow, that was SO MUCH easier than what I was trying! thanks!!!

  20. #20
    Forum Contributor
    Join Date
    09-13-2008
    Location
    Los Angeles, CA
    MS-Off Ver
    365
    Posts
    120
    I'm trying to change this to draw the arrow across(horizontally rather than vertically. I tried doing it but failed miserably... little help? Thanks!

    This is what i tried:
    Please Login or Register  to view this content.

  21. #21
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434
    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)

Similar Threads

  1. How to Change Drop Arrow Size
    By jagman in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-24-2013, 03:51 AM
  2. delte cells and there size
    By Ipsl in forum Excel General
    Replies: 2
    Last Post: 01-22-2008, 01:49 PM
  3. Problem Linking Cells in Different Workbooks
    By jeffc4442 in forum Excel General
    Replies: 7
    Last Post: 02-23-2007, 11:01 AM
  4. Allow entry into selected cells
    By SOCMentor in forum Excel General
    Replies: 1
    Last Post: 10-02-2006, 04:02 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