+ Reply to Thread
Results 1 to 6 of 6

Looping issues with a For statement

  1. #1
    Registered User
    Join Date
    02-04-2018
    Location
    Canberra, Australia
    MS-Off Ver
    2013
    Posts
    74

    Looping issues with a For statement

    Hi All,

    Trying to get a loop to through cells with a For statement.

    This works for me without the For statement

    Please Login or Register  to view this content.
    I need to convert to something like this

    Please Login or Register  to view this content.
    I need to convert it to work with the For statement below

    Please Login or Register  to view this content.
    Any help appreciated

    Cheers

    Dean

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,877

    Re: Looping issues with a For statement

    Please Login or Register  to view this content.
    Last edited by alansidman; 05-26-2020 at 12:51 AM.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    02-04-2018
    Location
    Canberra, Australia
    MS-Off Ver
    2013
    Posts
    74

    Re: Looping issues with a For statement

    Hi Alan,

    Thanks for the help,

    comes back with a syntax error


    Quote Originally Posted by alansidman View Post
    ws.Range("C" & i).Formula = "=LEFT(ws.Range("A" & i),(FIND(""."",Range("A" & i),1)-1))"

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,877

    Re: Looping issues with a For statement

    Need double quotes inside a quoted statement, so.....

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-04-2018
    Location
    Canberra, Australia
    MS-Off Ver
    2013
    Posts
    74

    Re: Looping issues with a For statement

    Thanks Alan

    I used the updated code above and this is the result I get in the formula bar once run with #NAME? error. Still not working

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    02-04-2018
    Location
    Canberra, Australia
    MS-Off Ver
    2013
    Posts
    74

    Re: Looping issues with a For statement

    Hi Alan,

    Persistence is a virtue. I got it to work

    Please Login or Register  to view this content.
    Thanks for your help.

    Cheers

    Dean

+ 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] VBA IF statement issues
    By zhead in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-22-2017, 02:35 PM
  2. [SOLVED] Having issues Looping
    By MattDtr in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-16-2013, 09:42 PM
  3. [SOLVED] VBA Looping issues
    By danola in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-30-2012, 07:11 AM
  4. looping for if statement
    By isabella in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-22-2010, 04:05 AM
  5. Looping issues
    By lian.cragg in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-13-2010, 11:15 AM
  6. Simple looping statement
    By eonizuka in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-07-2009, 06:59 PM
  7. looping issues
    By Marcus Gee in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-09-2007, 11:42 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