+ Reply to Thread
Results 1 to 21 of 21

Sum of YELLOW shades macro

  1. #1
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Sum of YELLOW shades macro

    Expected results done manually sheet 2 and sheet 3

    Need a macro to extract that report as sheet 2 and sheet3

    Data range required 25,000 rows

    I will leave the sheet 2 and Sheet 3 , so macro should the needful
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Sum of YELLOW shades macro

    See attached



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

  3. #3
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Sum of YELLOW shades macro

    Almost working added more data , it does not build the extra data
    And Sheet 2 also does not rebuild the extra data
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Sum of YELLOW shades macro

    Maybe it is programmed to read the sample area only
    Last edited by makinmomb; 09-16-2015 at 06:53 AM.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Sum of YELLOW shades macro

    You really must learn to clarify what you mean: if you run it against Sheet1 (rather than Sheet2) you will get the results. Why add sheet2 when it was unnecessary?

    Change the macro.

    Worksheets("Sheet2").Activate

    to

    Worksheets("Sheet1").Activate

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Sum of YELLOW shades macro

    FYI ..

    In Sheet1 , in X2

    =IFERROR(INDEX($B$1:$W$1,SMALL(IF($B2:$W2>0,COLUMN($B$1:$W$1)-COLUMN($B$1)+1,""),COLUMNS($B$1:B1))),"")

    Enter with Ctrl+Shift+Enter

    Copy across and down

  7. #7
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Sum of YELLOW shades macro

    The macro worked fine for the first data ,
    when you paste special values and formats of new data
    It does not update the expected result

    That array formula I have it , I am pasting results
    from another sheet as values and formats
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Sum of YELLOW shades macro

    You did not change the macro to point to Sheet1 as I previously told you!!!!!!

    Remove Sheet2 from the file.

  9. #9
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Sum of YELLOW shades macro

    Thank you John , works , wow

  10. #10
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Sum of YELLOW shades macro

    John , please look into why is it picking some stuff that is not shaded ,
    resulting into a wrong report , I have marked you 4 codes as Why , not sure
    if there are many more maybe
    Attached Files Attached Files

  11. #11
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Sum of YELLOW shades macro

    I am glad it is working as needed but it is picking other stuff that I don't want , Anyone can tune this macro

  12. #12
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Sum of YELLOW shades macro

    I cannot find any figures that are wrong.


    EV280C6 1 3 from Sheet 3
    From Sheet1

    EV280C6 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1<== Shop 1


    From Sheet3 Sheet1

    EV319AG38 1 2 WHY EV319AG38 2
    EV319AG39 1 2 WHY EV319AG39 2
    EV319AG41 1 1 WHY EV319AG41 1
    EV319AG42 1 1 WHY EV319AG42 1

  13. #13
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Sum of YELLOW shades macro

    It is doing as you requested: what don't you want? I am not a mind-reader.

  14. #14
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Sum of YELLOW shades macro

    These are not in yellow shade

    EV319AG38
    EV319AG39
    EV319AG41
    EV319AG42

    Yet they appear on the sum extract of results

  15. #15
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Sum of YELLOW shades macro

    Sorry I don't understand what you mean by "not in yellow stage". The macro extracts ALL shoes for ALL stores where count is > 0. The macro does not test shading!

  16. #16
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Sum of YELLOW shades macro

    I wanted yellow shade extract only , anyone please ?

  17. #17
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Sum of YELLOW shades macro

    There can a way out on the same macro , delete all rows with no yellow shade line and then sum

  18. #18
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Sum of YELLOW shades macro

    See attached: where did you ASK rather than imply from your heading that you wanted to select on shade?
    Attached Files Attached Files

  19. #19
    Forum Expert
    Join Date
    12-10-2006
    Location
    Sydney
    MS-Off Ver
    Office 365
    Posts
    3,525

    Re: Sum of YELLOW shades macro

    Hi makinmomb,

    Please don't PM users for help as it goes against the essence of having a public forum like this and is in breach of Rule 4 (refer here).

    Hi JohnTopley,

    I think what makinmomb is after is to copy across the relevant details from Sheet1 to Sheet3 of any cells that have a fill colour of yellow (refer cell B64 of Sheet1).

    Assuming this is the case, the following will do the job:

    Please Login or Register  to view this content.
    Regards,

    Robert
    ____________________________________________
    Please ensure you mark your thread as Solved once it is. Click here to see how
    If this post helps, please don't forget to say thanks by clicking the star icon in the bottom left-hand corner of my post

  20. #20
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,193

    Re: Sum of YELLOW shades macro

    The latest macro now copies the shaded cells: it wasn't explicitly asked for i.e. as a change to the original macro - I have just modified the original macro to cater for this.

  21. #21
    Forum Contributor
    Join Date
    01-04-2014
    Location
    East Africa
    MS-Off Ver
    MS OFFICE 2019 PRO
    Posts
    3,616

    Re: Sum of YELLOW shades macro

    John you saved my day , I am glad I did not have to do it manually , it could have taken the whole night and more

    Thank you again

+ 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] Highlight Yellow Active Row, PROBLEM: row selected before closing stays yellow
    By NumberCruncher311 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-12-2013, 07:01 PM
  2. Macro to change Height of rows which are highlighted in Yellow
    By SecretaryExcel in forum Excel General
    Replies: 3
    Last Post: 08-15-2012, 10:52 AM
  3. Macro To find match Value from other clomn and highlight in yellow
    By tariqnaz2005 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-16-2012, 09:42 AM
  4. Shades of grey
    By Andrew-R in forum The Water Cooler
    Replies: 58
    Last Post: 01-29-2012, 06:07 AM
  5. Macro to copy rows with red or yellow highlighted cell in column H
    By jamie.c in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-13-2009, 04:31 AM
  6. [SOLVED] formula for if Cell c1 is yellow shaded cell d1 should be yellow
    By Hardeep in forum Excel General
    Replies: 1
    Last Post: 10-27-2005, 10:05 AM
  7. [SOLVED] Shades of Gray
    By eternal_cat via OfficeKB.com in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-13-2005, 09:05 PM
  8. [SOLVED] Sort By Shades
    By Angela in forum Excel General
    Replies: 2
    Last Post: 08-25-2005, 05:05 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