+ Reply to Thread
Results 1 to 4 of 4

How to know err number (invalid row) in loop

  1. #1
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,275

    How to know err number (invalid row) in loop

    Please Login or Register  to view this content.
    I have data in col c type like this C2=jhonshon,15/06/1979
    C3 = david,1 january 1980
    Etc
    I want resume Age in col J with age 38 until matches in col c and in col K = count age (38,70 etc)
    My codis has sukses but there ara result in col j become 800 and that is imposible
    I dont know data is invalid my data so large
    I want my coding add coding iff err.number <> 1 then msgbox "err number" & R.row
    But i dont know to put in my codingI'
    Last edited by daboho; 01-06-2018 at 09:25 AM.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: How to know err number (invalid row) in loop

    I don't understand your description.

    This will test if the cell value (r) has a valid date.
    If it does not, it records the row number and cell value in the VBA Immediate window(Ctrl+G)

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,275

    Re: How to know err number (invalid row) in loop

    Thank you i want add my coding
    I have data in col c as blabala,date
    In col e i have data as s1,s1,s3,s3..etc
    In col J = resume age,col K =.count resume age,in col L = resume all data from col E and in col M = .count (resume col e)
    How to modikasi my coding
    with one or two dictionary
    Thank
    Before

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: How to know err number (invalid row) in loop

    Why not just split that column with commas as the delimiter, and look at the result?

    Before:

    daboho,1 Jan 2000
    daboho,29 Feb 2018


    After:

    daboho
    01 Jan 2000
    daboho 29 Feb 2018


    Valid dates align right (because they are numbers), invalid dates align left (because they are text). Widen the column as necessary to see.
    Entia non sunt multiplicanda sine necessitate

+ 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] Msgbox List all invalid cells (named ranges) - error For next loop
    By Tsangman007 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-18-2017, 02:35 AM
  2. wrong number of arguments or invalid property assignment vb6
    By vosit in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-03-2013, 05:40 AM
  3. "Invalid Call or Argument" in While Loop using MyFile = Dir
    By rogerdavid in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-20-2013, 02:18 AM
  4. [SOLVED] VBA loop to copy a worksheet a number of times, assign name each time based on loop number
    By TBG in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-29-2012, 10:54 PM
  5. [SOLVED] Nested For...Next Loop, Invalid Next control variable reference Error
    By cocobean in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-30-2012, 04:32 AM
  6. wrong number of arguments or invalid property assignment
    By fish88 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-25-2012, 05:23 AM
  7. "Invalid use of ME keyword" when trying to loop through all userform controls
    By max3732 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-07-2012, 03:10 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