+ Reply to Thread
Results 1 to 4 of 4

Loop and call problem

  1. #1
    Registered User
    Join Date
    03-20-2015
    MS-Off Ver
    2016
    Posts
    7

    Wink Loop and call problem

    Hi all!

    I am a very beginning in VBA (self-study+VBA for beginners training) and I have written below macro.
    I know that it is very rough and here comes my request.

    This macro is working when I use "call" but it doesn't when the body of called macro is put into the main formula and I don't know why. Any ideas?

    I had much trouble with loop the search of "XXX" in the proposal payment sheet. I couldn't make to search the next item.
    I was able to manage the way like it is but I don't like it. I am sure that there is an easier and without changing raw data way.

    Can you please roast my macro? Stress all weaknesses but with solution how to improve it in the future.... - this will be the best learning for me (on my mistakes).

    Data for payment proposal are basically imported from text file (not CSV) with many empty rows and columns.
    I deleted all data except the ones macro uses.







    Please Login or Register  to view this content.
    Last edited by xxxyyyzzz; 09-06-2018 at 04:10 PM. Reason: Forum Rule #1

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,811

    Re: Roast my macro - please :)

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Roast my macro - please :)

    ...and when you've changed the title you're likely to get more help with this if you include the actual workbook. With longer procedures like this many of us prefer to see the code in context so that we can better understand what it's doing.

    Since the file contains personal data then just anonymise any names. We don't mind how many M Mouse, D Duck or D Trump names you use.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    03-20-2015
    MS-Off Ver
    2016
    Posts
    7

    Re: Loop and call problem

    Changes has been done.
    I will remember next time about rules .

    I have uploaded updated sample file. I was able to change some code and there is no CALL problem.
    I cannot still manage with the loop and it's still overwriting raw data when is searching for GEUR.

    Any ideas what went wrong?

    Please Login or Register  to view this content.
    Last edited by xxxyyyzzz; 09-06-2018 at 04:09 PM.

+ 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 showing error ( macro not found ) while trying to execute macro every 1 minute
    By prabhuduraraj09 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2018, 07:58 PM
  2. Try to not roast this noob too hard
    By KidLA in forum Excel General
    Replies: 1
    Last Post: 05-13-2017, 07:26 PM
  3. [SOLVED] Define variable in macro than calling that macro inside another macro
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-21-2015, 10:58 AM
  4. [SOLVED] Macro to show Which macro didnt work in a nested macro
    By akhileshgs in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-10-2013, 03:21 AM
  5. Perform macro "on open" specific file- store macro in Personal Macro Workbook?
    By thompssc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-17-2012, 12:38 PM
  6. lookup macro, solver macro, realtime macro
    By xelhelp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-02-2011, 06:14 PM
  7. Cannot find macro error when running a macro from a macro in a diffrent workbook.
    By Acrobatic82 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2010, 09:22 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