+ Reply to Thread
Results 1 to 7 of 7

Change formulas to macro to create report

  1. #1
    Forum Contributor
    Join Date
    09-21-2022
    Location
    africa
    MS-Off Ver
    2019
    Posts
    175

    Change formulas to macro to create report

    Hi
    I need to change any formula to macro.
    I want merging amount in column G or E under headers are matching with column D for each sheet .
    in column A will be sheet names under cell(A4) and from B4:H4 should match for column D for each sheet and should merge amounts , if the cells B3,C3 are empty and if the cells B3,C3 contain DATES then will just merge amounts locates between two dates. I posted the result in REPORT sheet for two condition (two dates or not) from row5
    and should be clear data from B5:H110 when brings data
    when merge amounts for BUYING,SELLING,RESTTR,RESSR sheets are existed in column G . as the others sheets should sum for column E
    my real data about 12000 rows for each sheet
    also posted here
    https://www.mrexcel.com/board/thread...eport.1262641/
    Attached Files Attached Files
    Last edited by Maklil; 08-26-2024 at 04:18 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,003

    Re: Change formulas to macro to create report

    You don't need macro for this:

    For BUYING,SELLING,RESTTR,RESSR use:

    =SUMIF(INDIRECT("'"&$A5&"'!D1:D20000"),B$4&"*",INDIRECT("'"&$A5&"'!G1:G20000"))

    And for other change to:

    =SUMIF(INDIRECT("'"&$A5&"'!D1:D20000"),B$4&"*",INDIRECT("'"&$A5&"'!E1:E20000"))

  3. #3
    Forum Contributor
    Join Date
    09-21-2022
    Location
    africa
    MS-Off Ver
    2019
    Posts
    175

    Re: Change formulas to macro to create report

    thanks
    but if I don't need macro why you give me formula and I have really formula?

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,003

    Re: Change formulas to macro to create report

    For constency.

    anyway, here is a macro:

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

  5. #5
    Forum Contributor
    Join Date
    09-21-2022
    Location
    africa
    MS-Off Ver
    2019
    Posts
    175

    Re: Change formulas to macro to create report

    perfect !
    may also you do when write two dates?
    as I said
    and if the cells B3,C3 contain DATES then will just merge amounts locates between two dates.

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,003

    Re: Change formulas to macro to create report

    Here, try this:
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    09-21-2022
    Location
    africa
    MS-Off Ver
    2019
    Posts
    175

    Re: Change formulas to macro to create report

    thank you so much.

+ 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. Help to create a VBA macro report
    By public in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-01-2017, 08:14 AM
  2. [SOLVED] Assistance with using formulas to create a compliance report
    By AceForSale in forum Excel Formulas & Functions
    Replies: 31
    Last Post: 03-22-2016, 12:43 PM
  3. Macro to create a report
    By alonsogtz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-30-2015, 10:57 AM
  4. [SOLVED] Using either VBA or formulas to create a filtered list report from data sheet
    By HeyInKy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-24-2014, 12:38 PM
  5. [SOLVED] Need to create a Training report using macro
    By vinty in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-27-2012, 02:34 PM
  6. Change source data Macro (macro) in report template
    By andygeb in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-14-2010, 11:14 PM
  7. Making a Macro to create a report in word
    By draglin in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-16-2008, 05:17 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