Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Illinois
    Posts
    552
    Thanks
    0
    Thanked 1 Time in 1 Post

    Load array with cell location (Excel xp, Win2000)

    I want to search a worksheet for the word "GRAND TOTAL" and every cell that has these words in it, i want to load to an array(i). If the words GRAND TOTAL are in cells A41, I41, Y41, Q42 how do i get the A41 from Range("A41").select into the array?

    array(0) = "A41"
    array(1) = "I41"
    array(2) = "Y41"

    thanks for the help. I really appreciate all the great help i get here. thanks again

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Load array with cell location (Excel xp, Win2000)

    Try:

    <pre> array(0) = Range("A41").Address
    </pre>

    Legare Coleman

  3. #3
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Illinois
    Posts
    552
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Load array with cell location (Excel xp, Win2000)

    Thank you. Once i have the array loaded I just want to extract the numbers of the cell. A41, A2424, i want to load another array with num(0) =41 and num(1)=2424. I've tried val("A41") but that doesn't work. Thanks

  4. #4
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Load array with cell location (Excel xp, Win2000)

    Don't use the address property, use the row property which gives you just the row number. --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  5. #5
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Load array with cell location (Excel xp, Win2000)

    The code I posted to you in <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=vb&Number=114501&Search =true&Forum=All_Forums&Words=.address(false&Match= And&Searchpage=0&Limit=25&Old=allposts&Main=114374 >This Message</A> does exactly that.
    Legare Coleman

  6. #6
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Illinois
    Posts
    552
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Load array with cell location (Excel xp, Win2000)

    ok, it didn't work with address property so i'll try row. thanks a lot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •