+ Reply to Thread
Results 1 to 16 of 16

Extracting data based on cell value

  1. #1
    Forum Contributor
    Join Date
    04-25-2011
    Location
    Donegal, Ireland
    MS-Off Ver
    Excel 2013
    Posts
    133

    Extracting data based on cell value

    In the bottom of the 'AU' column on the 'Printers' tab of the enclosed workbook, I end up with a bunch of additional rows called 'New row'. This can vary from none to hundreds depending of various criteria.

    Up to now i have been able to cut and paste these rows + the header row, to another worksheet in the same workbook called 'New Rows' using the following code;

    Please Login or Register  to view this content.
    I should point out that the example provided here is an extract from my main workbook that i'm having the problem with. This workbook has 391 rows of data and 338-391 has 'New row' in the AU column

    I'm trying to get as much of my daily mundane tasks as automated as possible so any help would be greatly appreciated.
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Extracting data based on cell value

    Johnny,
    What is the issue? The code is working.

  3. #3
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Extracting data based on cell value

    The attached error is not related to the code. You are trying to use the selection method in multi-range, hence the error.

  4. #4
    Forum Contributor
    Join Date
    04-25-2011
    Location
    Donegal, Ireland
    MS-Off Ver
    Excel 2013
    Posts
    133

    Re: Extracting data based on cell value

    Hi Ab, I have 4 other workbooks (Desktops, Monitors, Notebooks and Scanners) that uses the identical code and it works perfect and it was working with the Printers workbook up until today. The only difference is there are hundreds more rows. See screenshot

  5. #5
    Forum Contributor
    Join Date
    04-25-2011
    Location
    Donegal, Ireland
    MS-Off Ver
    Excel 2013
    Posts
    133

    Re: Extracting data based on cell value

    the piece of code you provided runs along with 2 others and was working perfectly. What has changed and do you know what i can do to fix this

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Extracting data based on cell value

    The code should work with any length of column AU. If there are not values, the code will use this line If LR > 2 Then
    to skip the error. I would like to see the error you are getting on attached.

  7. #7
    Forum Contributor
    Join Date
    04-25-2011
    Location
    Donegal, Ireland
    MS-Off Ver
    Excel 2013
    Posts
    133

    Re: Extracting data based on cell value

    I attached a screenshot image to the thread starter, are you able to see it AB

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Extracting data based on cell value

    Johnny,
    Yes, I saw the error, but I am unable to locate it to the code. In which line of the code the error occurs?
    The yellow line?

  9. #9
    Forum Contributor
    Join Date
    04-25-2011
    Location
    Donegal, Ireland
    MS-Off Ver
    Excel 2013
    Posts
    133

    Re: Extracting data based on cell value

    AB, found the problem, for some reason some of the columns were hidden, after opening all the columns it works perfect again. Sorry for wasting your time, another lesson learned.

  10. #10
    Forum Contributor
    Join Date
    04-25-2011
    Location
    Donegal, Ireland
    MS-Off Ver
    Excel 2013
    Posts
    133

    Re: Extracting data based on cell value

    On another issue Ab, i also have empty (blank) columns range: AM to AS. is it possible to add to your code so that a 0 (zero) will be placed in the AI column if this range is blank.

  11. #11
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Extracting data based on cell value

    Is it if any cell in column AM-AS is blank add 0 to column AI?

  12. #12
    Forum Contributor
    Join Date
    04-25-2011
    Location
    Donegal, Ireland
    MS-Off Ver
    Excel 2013
    Posts
    133

    Re: Extracting data based on cell value

    exactly AB

  13. #13
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Extracting data based on cell value

    Forget to ask you: You have values of 4 in column AI. What would happen to these values, will they be replaced by 0?

  14. #14
    Forum Contributor
    Join Date
    04-25-2011
    Location
    Donegal, Ireland
    MS-Off Ver
    Excel 2013
    Posts
    133

    Re: Extracting data based on cell value

    yes, if any of the cells in the AM -AS range is blank

  15. #15
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Extracting data based on cell value

    Johnny,
    I am in middle of work and lost my concentration. I assumed that if any cell in a row is empty, 0, will be assigned to AI.
    If this is not what you wanted, I will adjust it in 1 hour time.
    Last edited by AB33; 01-10-2014 at 08:54 AM.

  16. #16
    Forum Contributor
    Join Date
    04-25-2011
    Location
    Donegal, Ireland
    MS-Off Ver
    Excel 2013
    Posts
    133

    Re: Extracting data based on cell value

    Thats perfect AB, truly appreciate your time and effort. Thank you

+ 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. extracting data based on text
    By nobodytwok in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-15-2013, 09:43 AM
  2. Replies: 1
    Last Post: 01-30-2013, 01:08 PM
  3. Extracting data based on partial data in a cell
    By richard moody in forum Excel General
    Replies: 5
    Last Post: 01-23-2013, 10:24 AM
  4. Extracting data from a row on one sheet into another sheet based on a unique cell
    By roshanvarghese in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-23-2013, 03:49 AM
  5. Extracting data based on content
    By loopkid1 in forum Excel General
    Replies: 5
    Last Post: 03-07-2006, 11:08 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