+ Reply to Thread
Results 1 to 8 of 8

Macro to extract data up to a certain Value

  1. #1
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Macro to extract data up to a certain Value

    I have data in Sheet Imported Data


    I would like to macro to copy the data on sheet "imported Data" up to the maximum value on sheet "Extract' on Col U2


    Your assistance in this regard is most appreciated
    Attached Files Attached Files
    Last edited by Howardc1001; 05-17-2021 at 07:23 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Macro to extract data up to a certain Value

    Hellow Howard,

    I've assumed that you are basing the extracting on Column F in the Import Data sheet and want it pasted to the Extract sheet.

    I've attached your sample with the code implemented and based on the above assumptions.

    I've formatted Column F to Accounting. The same for U2 in the Extract sheet. I've also assumed that you'd want the Extract sheet cleared with each transfer of data.

    Here's the code:-

    Please Login or Register  to view this content.
    I hope that this helps.

    Cheerio,
    vcoolio.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Re: Macro to extract data up to a certain Value

    Thanks Vcoolio

    All the values are being extracted to sheet2

    I only want the value <= the value in U2 to be extracted to sheet2

    I have manually extracted the data


    Kindly check & amend your code
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Macro to extract data up to a certain Value

    Hello Howard,

    ........up to the maximum value on sheet "Extract' on Col U2
    Have a close look at the filter line in the code.

    There's nothing to amend. Have a look at the value you have in U2 then have a look at the values in Column F of the Import data sheet.
    They're all below 200,000!
    Change it to, say, 18,000 and see what happens.

    Cheerio,
    vcoolio.

  5. #5
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Re: Macro to extract data up to a certain Value

    Hi Vcoolio

    Sorry for not being clear from the start

    The total of all the values that are in Col F to be extracted must not exceed 200,000

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Macro to extract data up to a certain Value

    Still not clear

    maybe accumulate sum in Col F not exceed 200,000

    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    07-12-2018
    Location
    South Africa
    MS-Off Ver
    Office 2021
    Posts
    2,725

    Re: Macro to extract data up to a certain Value

    Hi Bo_Ry


    your code works 100%

  8. #8
    Valued Forum Contributor
    Join Date
    06-29-2014
    Location
    Australia
    MS-Off Ver
    MSO 365
    Posts
    1,098

    Re: Macro to extract data up to a certain Value

    Hello Howard,

    Looks like Bo_Ry took care of business whilst I was sound asleep.
    Pretty nifty I must say!

    Good to see you have another one sorted out!

    Cheerio,
    vcoolio.

+ 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] macro to extract data from .txt file
    By ratm698 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-24-2020, 10:58 AM
  2. [SOLVED] Macro to extract data from a URL
    By Flabbergaster in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-13-2014, 07:13 PM
  3. [SOLVED] Pausing A Macro (allow user to extract data) aAnd Resume Macro
    By jbumps in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-15-2013, 01:59 PM
  4. macro to extract data
    By kt090678 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-10-2011, 04:55 PM
  5. Macro to extract Data
    By dandavis1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-07-2008, 07:33 AM
  6. How to Extract Data using Macro?
    By da80th in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2007, 06:39 AM
  7. Macro to extract data
    By Bill A in forum Excel General
    Replies: 3
    Last Post: 02-15-2006, 08:35 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