+ Reply to Thread
Results 1 to 16 of 16

Extract Rows & Prepare specific format 2022

  1. #1
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Question Extract Rows & Prepare specific format 2022

    Dear Keeb,

    Hello! How are, hope U R doing well. Strange to comeback to you with old topic of 2 years ago.

    Actually a small change related to old topic which can be referred HERE.

    The issue came when same provider is having 2 different period. I try to change the below function but couldn't. Can you help me on my below question.

    Question: If a same provider having 2 different period and 2 different agreed %, can it be possible to grab start and end date with provider code. Below is the code.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Copy of your previous file is attached for your reference.

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Extract Rows & Prepare specific format 2022

    Hi, will take a look.
    Won't be 'til after the weekend.
    Have to read-up on the code again and freshen my memory to see what I did and can do for you
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Extract Rows & Prepare specific format 2022

    Thanks Keeb. Take UR time.

    Thanks for responding to my request.

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Extract Rows & Prepare specific format 2022

    Hi, just got back, hiere is just the idea how to read more than one entry for duplicate codes
    Please Login or Register  to view this content.
    I only did the dubug.print but this you can change to an array that is filled and returned as answer
    It's late now so I'm off to bed

  5. #5
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Extract Rows & Prepare specific format 2022

    Thanks Keeb,

    I have try it doesn't work. below is the code which i am changing.

    Please Login or Register  to view this content.

  6. #6
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Extract Rows & Prepare specific format 2022

    I told you that my code does NOT return a value, it just shows you how the routine looks like when you have more than one found item

  7. #7
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Extract Rows & Prepare specific format 2022

    You will have to explian it better.
    I do not see where what goes, I just showed you how to find more than one code if it is duplicated or more

  8. #8
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Extract Rows & Prepare specific format 2022

    Maybe this ies what you are looking for
    Added a parameter to the coode I had posted

  9. #9
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Extract Rows & Prepare specific format 2022

    Thanks Keeb,

    It is working as i want. I will try only original data let you know.

    Thanks once again.

  10. #10
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Extract Rows & Prepare specific format 2022

    Hai Keeb,

    Surprisingly it is working on the attachment which you share with me but when i plug it to my original file it is doesn't work. I try my best to figure it out what is the issue but did not successes. Can you help me to fix this issue.

    Kindly share with me what is the mistake I am doing while implementing your change in my original file.

    Copy of my original file is attached for your reference.
    Attached Files Attached Files

  11. #11
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Extract Rows & Prepare specific format 2022

    The mistake is that you did not check the code I have.
    You forget to pass the yearval

    this is the correction you need

    Please Login or Register  to view this content.

    Add the line of code I have marked in red
    Attached Images Attached Images

  12. #12
    Valued Forum Contributor
    Join Date
    01-11-2012
    Location
    Riyadh, K.S.A.
    MS-Off Ver
    Windows 11 with Excel 2013 & 2016
    Posts
    900

    Re: Extract Rows & Prepare specific format 2022

    Dear Keeb,

    Many thanks for correcting me and much appreciate for your help. It is working on my original file also.

    Topic marked as closed and reputation added.

    Thanks once again.

  13. #13
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Extract Rows & Prepare specific format 2022

    It’s all in the details 😉
    Glad to have been able to help you.
    “IT” Always crosses your path ...

  14. #14
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Extract Rows & Prepare specific format 2022

    Just to help you understand my idea.
    The function to search for the agreed percentage takes two parameters, first the provider code and second the year value in column C, that is the last four characters in that cell as number.
    This is then used to identify which provider code from the Lists sheet you need and it also cross-checks the year value in the date column

  15. #15
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Extract Rows & Prepare specific format 2022

    In case you want to setup the Satement (Final) worksheet for printing (landscape) you can try this macro
    Please Login or Register  to view this content.
    Place it in a separate module or add it to an existing module (but then ignore the Option Explicit)
    It takes a default boolean parameter as false to put it all don without page breaks, if you pass it as TRUE the worksheet will be split per Satement

    I added the call line here

    Please Login or Register  to view this content.
    if you call it like this it will split the worksheets

    Please Login or Register  to view this content.
    Might come in handy

  16. #16
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Extract Rows & Prepare specific format 2022

    Hi, I noticed you did not take a look anymore at the print seteup.
    Just out of curiosity I modified the code and reduced the number of VBA codelines that were repeated making it easier to maintain.
    Nothing much but just some brain gymnastics for me
    Attached Files Attached Files

+ 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] How do I create formula for "All 2022 Mondays" as Column headers, in date format?
    By Zenmusicman in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-04-2022, 05:51 PM
  2. Want to covert date format from 13.01.2022 00:00:58.799 this to this 1/13/2022 0:00
    By Ali54121 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-14-2022, 01:24 AM
  3. [SOLVED] Extract Rows & Prepair specific format
    By hecgroups in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-24-2020, 02:11 AM
  4. [SOLVED] Prepare report for specific name based on database
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 25
    Last Post: 01-13-2016, 03:28 PM
  5. Extract data from one sheet to another worksheet in a specific format
    By divi123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2014, 02:52 AM
  6. Replies: 2
    Last Post: 02-29-2012, 08:53 PM
  7. Help to prepare a database with data from 12 different sheets in a specific sequence.
    By theexcelnovice in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-12-2009, 06:10 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