+ Reply to Thread
Results 1 to 3 of 3

ForEach loop problem

  1. #1
    Forum Contributor
    Join Date
    10-26-2018
    Location
    Vienna, Austria
    MS-Off Ver
    2016 professional
    Posts
    148

    ForEach loop problem

    Dear Users,



    my goal is to copy all of the numbers from the "copyPaste" sheet to the other sheet which are between 41000000 and 42000000.

    If I run the code below it only gives the last value that is between these two. (it is also very slow...)

    Can you spot the mistake?

    (since I am a rooky I would learn the most if there would be as many changes as it is necessary if you add to it.. the goal is mainly to know my mistake than realy get the values)

    Please Login or Register  to view this content.

    Thank you indeed for your time and help

    please see attachment
    Attached Files Attached Files

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: ForEach loop problem

    Try

    Please Login or Register  to view this content.
    Your code appears to be overwriting the target cell.
    Martin

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,079

    Re: ForEach loop problem

    Without a loop
    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. [SOLVED] Convert data (a bit like a FOREACH?)
    By simonp820 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-04-2016, 03:32 PM
  2. Excel 2007 Sumproduct foreach day in column?
    By jrider64 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-29-2015, 02:27 PM
  3. Foreach Name in a List Paste a Template of Cells
    By Codeman553 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-03-2013, 10:25 AM
  4. [SOLVED] Foreach loop lookup between two worksheets
    By asparak in forum Excel General
    Replies: 7
    Last Post: 07-14-2012, 05:03 AM
  5. Replies: 2
    Last Post: 06-25-2012, 12:24 PM
  6. [SOLVED] ForEach statement problem
    By excelnut1954 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-31-2006, 05:40 PM
  7. Problem adding charts using Do-Loop Until loop
    By Chris Bromley in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-23-2005, 09:06 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