+ Reply to Thread
Results 1 to 8 of 8

Setting array from table with zero rows

  1. #1
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Setting array from table with zero rows

    Hi,

    i am using code:

    Please Login or Register  to view this content.
    and this is throwing error "91".

    Everything is working when i have at least one row in table fullfilled. When i have empty row like here:

    Screenshot_20.png

    It is not working.

    Please help why this is happening and what is workaround,
    Jacek

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Setting array from table with zero rows

    Use error handler to mask the error popup.

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Setting array from table with zero rows

    Hi,

    thank you.
    But i have to use this databodyrange in later part of code.

    Please Login or Register  to view this content.
    And i will get also error here...
    Should i set up this as range and just use it?

    How can i globally avoid issue?
    Maybe if there is error it should use range from listobject?

    Best,
    Jacek

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Setting array from table with zero rows

    Quote Originally Posted by jaryszek View Post
    But i have to use this databodyrange in later part of code.
    Like this you can handle it

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    01-16-2014
    Location
    Poland
    MS-Off Ver
    Excel 2016-365
    Posts
    2,940

    Re: Setting array from table with zero rows

    ok thank you i was thinking also about flag,

    great!

    Jacek

  6. #6
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,416

    Re: Setting array from table with zero rows

    Quote Originally Posted by :) Sixthsense :) View Post
    Like this you can handle it

    Please Login or Register  to view this content.
    I think you can do this without a flag... I believe this also work.
    Please Login or Register  to view this content.

  7. #7
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Setting array from table with zero rows

    Quote Originally Posted by Rick Rothstein View Post
    I think you can do this without a flag... I believe this also work.
    Hmm... Better approach

  8. #8
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Setting array from table with zero rows

    Why?
    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] table(A) as an array using all rows but only selected columns to compare with table(B)
    By se3unlock in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-27-2015, 10:15 AM
  2. Help with an array formula to evaluate only certain rows from data table
    By keneastman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-08-2015, 03:35 PM
  3. How Do You Count Unique Cell Entries In A Column With Many Rows Without Using Table Array
    By OffInParametricLand in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-17-2014, 04:20 PM
  4. Array formula to return a table excluding rows meeting a certain criteria
    By puckman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-12-2013, 07:54 AM
  5. Help setting up correctly table (rows columns)
    By andy.k in forum Excel General
    Replies: 5
    Last Post: 06-03-2013, 10:26 AM
  6. [SOLVED] Array Formula to Lookup and Return All Rows in Table that Meet Single Criteria
    By Torkel74 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-15-2013, 10:41 PM
  7. [SOLVED] Finding min,max in an array using selected rows from a table
    By Dazed and confused about min, max in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-25-2005, 05:06 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