+ Reply to Thread
Results 1 to 3 of 3

VBA Code anomaly

  1. #1
    Registered User
    Join Date
    11-18-2023
    Location
    Nigeria
    MS-Off Ver
    Office 365
    Posts
    1

    VBA Code anomaly

    Hello everyone,
    I hope I could get some help here with my vba code below:

    Please Login or Register  to view this content.
    For any reason unknown to me above code fails to return the desired filter from the table.
    The code is supposed to loop through the "MomentumDescription" column and fetch only the "New Wave Positive" elements that are between any two "SQ Cancelled" element in that column within a specified timeframe in cell E5 from the "Timeframe" column in a worksheet named "Trend Analysis". The "SQ Cancelled" is the boundary that marks a cycle (LV). The code is supposed to exit after the first five cycles and write out the output in a new worksheet named "OutputData". But the output of the code only return just one of the "New Wave Positive" element in each cycle together with other elements that are not needed from the dataset.

    Can someone please help me out with the logic to only fetch the total occurrences of "New Wave Positive" Element within the specified timeframe that is between every "SQ Cancelled" element. I also need the last "SQ Cancelled" element to be fetched together with the "New Wave Positive" elements per cycle.
    Last edited by alansidman; 11-18-2023 at 07:19 PM.

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

    Re: VBA Code anomaly

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however your post does not comply with our guidelines

    Please take a moment to review how to add code tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Guideline #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here.

    As you are new to this forum, I have added the code tags for you today. Please take a few minutes to read our guidelines and rules and comply in the future
    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 Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,305

    Re: VBA Code anomaly

    see big yellow banner - how to upload your workbook - far easier then to give you a tested solution.
    Torachan,

    Mission statement; Promote the use of Tables, Outlaw the use of 'merged cells' and 'RowSource'.

+ 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] Strange anomaly with code and project window.
    By kjg in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 02-26-2021, 04:46 AM
  2. Possible Search Anomaly
    By LJMetzger in forum ExcelTip.com Feedback / Comments / Suggestions
    Replies: 3
    Last Post: 12-23-2019, 03:09 AM
  3. Another counting anomaly
    By Alan Beban in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-05-2018, 07:22 PM
  4. Summation Anomaly
    By dups1822 in forum Excel General
    Replies: 3
    Last Post: 07-14-2017, 08:39 AM
  5. [SOLVED] Formula anomaly
    By Mulpuzzle in forum Excel Formulas & Functions
    Replies: 30
    Last Post: 07-29-2016, 12:14 AM
  6. Clearing Form Controls - Code Anomaly
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-18-2009, 11:01 PM
  7. Printing Anomaly
    By Otto Moehrbach in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-26-2005, 11:05 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