+ Reply to Thread
Results 1 to 7 of 7

Loop through rows select the same cell

  1. #1
    Forum Contributor
    Join Date
    02-13-2017
    Location
    Durham
    MS-Off Ver
    2013
    Posts
    126

    Loop through rows select the same cell

    Hi guys,

    I'm looking to loop through rows and select the same Cell each time - its doing my head in!

    So far:

    I have the LastRow count i.e.

    Please Login or Register  to view this content.
    works fine

    I have what I want to feed the cell value into i.e.

    Please Login or Register  to view this content.
    So as an example:

    - I want the code to select D1
    - Call my code to test the value of D1
    - Feed back value
    - Then back to the beginning i.e. select D2, D3, D4 etc etc
    - Until LastRow is hit

    in the following layout I assume

    Please Login or Register  to view this content.
    any guide on the cell selection loop would be most helpful!

    Thanks
    Last edited by Scoobster_doo; 05-15-2017 at 08:53 AM.

  2. #2
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Loop through rows select the same cell

    Hi Scoobster_Doo

    By now you should know about code tags!!!!

    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  3. #3
    Forum Contributor
    Join Date
    02-13-2017
    Location
    Durham
    MS-Off Ver
    2013
    Posts
    126

    Re: Loop through rows select the same cell

    Whoops - I didn't think it was 'code enough' for code tags

    Ill give it a go thank you

  4. #4
    Forum Contributor
    Join Date
    02-13-2017
    Location
    Durham
    MS-Off Ver
    2013
    Posts
    126

    Re: Loop through rows select the same cell

    Hey Sintek,

    It appears to be looping the same cell over and over.

    I've dropped
    Please Login or Register  to view this content.
    in to confirm this. However the
    Please Login or Register  to view this content.
    value is changing.

    Thanks

  5. #5
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Loop through rows select the same cell

    It appears to be looping the same cell over and over.
    Is there any information in D1, D2, D3 etc

    The code works:
    Option Explicit

    Please Login or Register  to view this content.
    Last edited by sintek; 05-15-2017 at 09:11 AM.

  6. #6
    Forum Contributor
    Join Date
    02-13-2017
    Location
    Durham
    MS-Off Ver
    2013
    Posts
    126

    Re: Loop through rows select the same cell

    Got it sorted thank you.

    With me calling in a function, I needed to pass values which was causing issues.

    Thank you

  7. #7
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,239

    Re: Loop through rows select the same cell

    Glad you got it working...post your result please...thanks for rep points

+ 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. Using For Loop to Select non-contiguous rows VBA
    By kdd2156 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-04-2016, 02:06 PM
  2. [SOLVED] How to select a certain cell in the loop
    By elmnas in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-27-2015, 07:20 AM
  3. [SOLVED] Select Value in current cell while in a Loop
    By cooper.1651 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-01-2015, 09:58 PM
  4. Loop through rows with VBA and select an excel output file with selectable dates
    By craigsmack in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-09-2014, 05:52 PM
  5. [SOLVED] How to select the located cell after a loop for pasteing?
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-20-2014, 01:51 PM
  6. Loop Across Columns...If Blank Cell, Loop Down Rows
    By flindy87 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-25-2014, 07:05 PM
  7. Loop Across Columns If Blank Cell Loop Down Rows
    By flindy87 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-05-2014, 10:22 AM

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