+ Reply to Thread
Results 1 to 2 of 2

Loop through specific range and copy values to another sheet if condition is met

  1. #1
    Registered User
    Join Date
    02-24-2022
    Location
    Germany
    MS-Off Ver
    2021
    Posts
    1

    Loop through specific range and copy values to another sheet if condition is met

    Dear internet,

    I am currently building an Excel tool for my bachelor's thesis and I am kinda lost as I seem to stupid to figure out (to me) more complex VBA. This is like the last thing I need to be done with this tool, so help is highly appreciated!

    So I have a sheet (INPUT DATA) with the structure as shown in the Excel file attached. The aim is to basically get a report with two lists based on conditions met in column B and C with content from column D and E in another sheet (OUTPUT DATA). It should indicate all measures a user has not fulfilled yet in two categories "Mandatory measures" and "Recommended measures".

    Which measures are recommended and which ones mandatory changes dynamically based on user input. The idea is to have the user click a button once he is done with all input (which is basilly filling out a questionnaire ticking boxes with yes/no where I do some clean up of input), so the list is fully set up with no more changes to generate the report with the two lists.

    My idea was to loop through every row and check first: if B (Done?) = FALSE and C (Category) = Mandatory --> place cell value from D (Headline) in next empty cell and E (Text) in the one following
    Until there are no more cells in INPUT DATA filled with values (which is about 100 rows in total)

    Once done for all mandatory measures, same should be done for the recommended measures with a headline indicating the change in between (see OUTPUT DATA for inteded formatting). So again if B (Done?) = FALSE and C (Category) = Recommended --> place cell value from D (Headline) in next empty cell in OUTPUT DATA list and E (Text) in the one following

    I have googled quite a qhile and watched some tutorials on VBA, but hell, I just can't figure it out - thank you very much!

  2. #2
    Forum Expert CheeseSandwich's Avatar
    Join Date
    12-22-2021
    Location
    Kent, England
    MS-Off Ver
    365 - 2503
    Posts
    1,485

    Re: Loop through specific range and copy values to another sheet if condition is met

    Maybe something like:

    Please Login or Register  to view this content.
    Hope this helps

+ 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] Loop for values higher than in range and copy in another sheet
    By PaulM100 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-06-2019, 03:43 AM
  2. How to use a For Loop to copy and paste to another sheet based on condition?
    By maym in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-15-2018, 10:31 PM
  3. Auto copy specific data from sheet to antoher sheet under few condition
    By Shermaine2010 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-17-2014, 04:47 AM
  4. [SOLVED] Copy and paste range as values to specific sheet/range
    By lukestkd in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-06-2014, 09:48 PM
  5. Loop through column and copy specific values to another sheet for calculations
    By caoexcel in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-06-2013, 02:49 PM
  6. Copy specific range when a condition is met
    By nikenis in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-04-2012, 02:25 AM
  7. Copy specific range from sheet to another if condition in cell met
    By Zagadka in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-28-2012, 11:42 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