+ Reply to Thread
Results 1 to 19 of 19

VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

  1. #1
    Forum Contributor
    Join Date
    12-16-2013
    Location
    World
    MS-Off Ver
    Excel 2007
    Posts
    215

    Question VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    Dear Experts,

    It is different concept,

    *Read one cell values and One entire Column (Ex:AH2 and X column)

    *If Same Value coincide, extract that value to another Cell for sort out order by Description (Ex: Extract X column Value to AH6 Cell)

    *So Values are Divided by Matching Criteria and Description basis.

    Please find the sample file for more clarity and kindly provide suitable code.


    Thanking you All,
    Best Regards.
    Attached Files Attached Files
    Last edited by pvsvprasad; 09-16-2016 at 09:58 AM.

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    Hello pvsvprasad,

    I am sorry but your Workbook and explanations are very confusing, and no one will know how to try and help you.

    You should at least tell and show us how and where you want what Results, and how you arrive at that requirement.

    Please see the questions in the attached Workbook.

    Regards.
    Attached Files Attached Files
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    You can use this code :
    Please Login or Register  to view this content.
    Last edited by sanram; 09-16-2016 at 06:12 PM.

  4. #4
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    @sanram,

    On what assumptions do you base your Coding.

    Regards.

  5. #5
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    @ Winon :
    He is trying to get the values of AG6:AH8 and AG11:AH13 from AH2 and AH3 by matching his condition with W4:X13.

    I created another code for this person yesterday to get the values of AH2 and AH3. That's why may be I have got his point.

  6. #6
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    @sanram,

    Thank you for the feedback.

    At least you have some idea of what he wants.LOL

    Maybe you should test your Code in Excel 2007, since that seems what tho OP is using. At my end, with Excel 2010 it does not work. Could you perhaps upload a working sample Workbook with a version of your Code saved in a Format prior to Excel 2013, so that our platforms can see how it works?

    Thank you.

  7. #7
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    Sure. Here is the file. I have saved this with Excel 2007.
    Attached Files Attached Files

  8. #8
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    Thank you sanram.

    I must admit, I remain at a complete loss.

    Maybe I am too tired, being way past my bedtime, it is already 01:30am on my side of the globe, and time to head to bed.ZZZZZZZZZZZZZ

    Regards.

  9. #9
    Forum Contributor
    Join Date
    12-16-2013
    Location
    World
    MS-Off Ver
    Excel 2007
    Posts
    215

    Re: VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    Quote Originally Posted by Winon View Post
    Hello pvsvprasad,

    I am sorry but your Workbook and explanations are very confusing, and no one will know how to try and help you.
    Please see the questions in the attached Workbook.

    Regards.
    Dear Master,

    Thank you for your Kind Reply.

    Here i have attached detail explanation for output. please find answered file.

    Thanking you,
    Best regards.
    Attached Files Attached Files
    Last edited by pvsvprasad; 09-17-2016 at 06:12 AM.

  10. #10
    Forum Contributor
    Join Date
    12-16-2013
    Location
    World
    MS-Off Ver
    Excel 2007
    Posts
    215

    Re: VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    Quote Originally Posted by sanram View Post
    You can use this code :
    Dear Sir,

    Your Code is working good.in my sample file (Post#1) having "Sheet2" and two output rows required in this sheet (AD5 to AE6 only), How to modify your code For "Sheet2" inputs to get those values? please find here also.

    if AH6 to AH8 or AH11 to AH13 cells are blanks then AG6 to AG8 or AG11 to AG13 cells should be shown as "0".( at Sheet1 and need Sheet2 also same concept) and while using code hang is happened in excel file, please tweak for smooth experience.

    Thank you for preparing.

    Best Regards.
    Attached Files Attached Files
    Last edited by pvsvprasad; 09-17-2016 at 08:46 AM.

  11. #11
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    You can use this for sheet 2

    Please Login or Register  to view this content.
    Kind regards
    Leo

  12. #12
    Forum Contributor
    Join Date
    12-16-2013
    Location
    World
    MS-Off Ver
    Excel 2007
    Posts
    215

    Re: VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    Quote Originally Posted by LeoTaxi View Post
    You can use this for sheet 2

    Kind regards
    Leo
    Dear Master,
    Thank you for providing new code for Sheet2, it is working good. need small final correction only.

    If AE2 or AE6 cells empty, then AD5 or AD6 should be show as "0", like a your previously provided code by you. please make a small final modification for Sheet2 and Sheet1 also same problem kindly modify.

    Thanking you,
    Best regards.
    Last edited by pvsvprasad; 09-17-2016 at 09:03 AM.

  13. #13
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    For both Sheets

    Please Login or Register  to view this content.
    Cheers
    Leo

  14. #14
    Forum Contributor
    Join Date
    12-16-2013
    Location
    World
    MS-Off Ver
    Excel 2007
    Posts
    215

    Re: VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    Quote Originally Posted by LeoTaxi View Post
    For both Sheets

    Cheers
    Leo
    Dear Master,

    Your Code is really nice. at Sheet 2, AD6 cell "0" is not developed. please check for remaining cells also if any missing.

    Thanking you,
    Best regards.
    Attached Files Attached Files
    Last edited by pvsvprasad; 09-17-2016 at 11:29 AM.

  15. #15
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    Here is the adjustment of my code :
    Please Login or Register  to view this content.

  16. #16
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    This for the 0

    Please Login or Register  to view this content.
    For the missing ???
    explain


    Kind regards
    Leo

  17. #17
    Forum Contributor
    Join Date
    12-16-2013
    Location
    World
    MS-Off Ver
    Excel 2007
    Posts
    215

    Re: VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    Quote Originally Posted by sanram View Post
    Here is the adjustment of my code :
    Dear sir,
    Thank you for modification and now working good.

    Thanking you,
    Best regards.
    Last edited by pvsvprasad; 09-18-2016 at 09:42 AM.

  18. #18
    Forum Contributor
    Join Date
    12-16-2013
    Location
    World
    MS-Off Ver
    Excel 2007
    Posts
    215

    Re: VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    Quote Originally Posted by LeoTaxi View Post
    This for the 0

    Kind regards
    Leo
    Dear sir,

    Thank you for great modification about "0". now your code is perfect.


    Thanking you,
    Best regards.

  19. #19
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: VBA Macro Dividing Values Based upon Matching Criteria and Description Criteria

    You are welcome and thanks for the rep.

+ 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. Formula or Macro to lookup values in closed spreadsheet based on description. . .
    By dara3273 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-29-2015, 04:31 PM
  2. Macro to delete rows based on two different criteria matching
    By Cpower17 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-25-2014, 05:43 PM
  3. Macro for procuring values from a dataset using different matching criteria
    By Raghukumarn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-30-2014, 01:40 PM
  4. matching values based on criteria and return values from another columns
    By lizard54 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2012, 11:29 AM
  5. Macro to copy a range of dates based on matching criteria
    By christopherb in forum Excel General
    Replies: 0
    Last Post: 06-10-2011, 05:39 AM
  6. Replies: 1
    Last Post: 12-14-2009, 02:24 PM
  7. Count unique values based on matching criteria
    By gromitw in forum Excel General
    Replies: 9
    Last Post: 01-10-2007, 08:59 AM

Tags for this Thread

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