+ Reply to Thread
Results 1 to 8 of 8

How do I iterate through rows in Excel?

  1. #1
    Registered User
    Join Date
    03-23-2011
    Location
    bottom of ocean
    MS-Off Ver
    Excel 2003
    Posts
    7

    Question How do I iterate through rows in Excel?

    Hello,
    I hope you can help. I am using Excel 2003 and have two worksheets set up. Sheet 1 and Sheet 2. Sheet 2 has columns with data set up like below:

    A B C D E

    In A, there are ID numbers, and there can be duplicate cells in column A with the same ID number. I need to iterate through the rows until I find all cells in column A with, for example, id=432. For each cell in column A with id = 432, I need to get the value in column E and total it up. When that is completed, the result of that total will be inserted into a cell in Sheet 1.

    This must be really easy for an experienced coder, but I only do this sort of thing once in a pink moon

    Any help with this would be greatly appreciated.
    Last edited by platypus; 03-23-2011 at 04:43 PM. Reason: changing title

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: How do I iterate through rows in Excel?

    hi, platypus, please post sample workbook showing original data and result you need to obtain

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How do I iterate through rows in Excel?

    Look at using a PivotTable, you don't need VBA
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: How do I iterate through rows in Excel?

    Hi platypus
    In sheet 1
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  5. #5
    Registered User
    Join Date
    03-23-2011
    Location
    bottom of ocean
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: How do I iterate through rows in Excel?

    royUK,

    Pivot table won't work because I have to go through a similar process for various other worksheets with different type of data that has to be extracted and inserted into other worksheet.

    Thanks, though.

  6. #6
    Registered User
    Join Date
    03-23-2011
    Location
    bottom of ocean
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: How do I iterate through rows in Excel?

    Pike, your solution looks persuasively simple. But I can't give it a go because I just realized that I left my file on another usb stick at uni. Will let you know in 24 hours how it went.

  7. #7
    Registered User
    Join Date
    03-23-2011
    Location
    bottom of ocean
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: How do I iterate through rows in Excel?

    Pike, you are magic! It worked Many thanks!

    Quote Originally Posted by pike View Post
    Hi platypus
    In sheet 1
    Please Login or Register  to view this content.

  8. #8
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,342

    Re: How do I iterate through rows in Excel?

    No Problems
    Last edited by pike; 03-23-2011 at 04:46 PM. Reason: already solved

+ 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