nested loop

  1. M

    VBA Nested For Each Loop Help

    I am new to VBA and new to the forum. I have spent hours trying to find how to make this macro and have had no success and appreciate any assistance. I am trying to make a nested loop The first loop creates a new worksheet from a template (if it doesn't already exist) for each cell in column...
  2. S

    VBA - Dynamic Nested Loops

    Dear madam/sir, I'm trying to loop over all possible combinations when choosing c items out of a possible n. This is easily done with nested loops, as my example shown below. However, the number of for-loops needed depends on the input parameter of c (the number chosen). I'm scratching my head...
  3. O

    VBA Code Run Time Error on Double Loop To Name Range

    Thanks in advance for any suggestions for which I will provide feedback. I am trying to name range cells which start on row 6 and end on 51 between columns D (column 4) and Z (column 26). The names are a combination of what's in row 6 through 51 in column A and columns D through X in row 1...
  4. S

    Nested For Next Loop

    I'm trying to use a "nested For Next loop" for the first time. I would appreciate your help for the following problem. Below is my code. I apologize for its length but, I thought it might be needed in its entirety to understand the issue. I'm getting a Compile Error - Next without For...
  5. N

    Vba not responding with nested loop (priority sheet)

    Hi all, I need help with vba, I want to make vba to: Search day and month from 4 sheet: Sheet1, Sheet2, Sheet3, Sheet4 from 1 January to 31 December There's priority sheet sequence sheet1 ->sheet2 -> sheet3 -> sheet4, it can't be mix or the calculation will all wrong So if it at 1 January the...
  6. D

    Loop within a loop causing memory leakage

    The following code results in a huge jump in memory (that isn't released once its run) even though there is only 2 Integer variables and 1 String variable. Its a simplified version of some 'real code' which makes VBA run out of memory and crash. Any ideas what's going on and how to resolve? Sub...
  7. R

    SUMIFS ranges in a nested loop question

    Dear All, Pretty much a total noob here :) I'm trying to build a sumifs function with two conditions (transaction date and transaction code which are in columns of unique values) into a nested loop. tr_date and tr_code return string values which are a date and an alphanumeric code which seem...
  8. B

    Nested If-Elseif-Else loop involving dates in VBA

    Please help me write this code. Thanks!! Ask the user to enter date. If the user enters date between January – May Display: “Online Class Only!” If the user enters date between June – July Display: “No class available!” If the user enters date between August – November Display: “Two...
  9. A

    nested loop ; object or number ; find function

    Hello, Thank you for your help in advance. I've got two things I'm specifically looking for help on, and also appreciate any recommendations. 1. I'm having trouble getting the .find function working below - which is bold and underlined 2. I'm wondering if the 'IF' statment below the .find...
  10. K

    VBA Nested Loop for Cost Allocation

    Good day all. I'm using Excel 2007 and am working on my first attempt at a Loop. I've spent alot of time looking at other posts. I believe I understand the individual concepts but can't seem to put it all together. It's time to ask for assistance. This is an allocation loop. Rows 5-7...
  11. Z

    Array in condition of Do While loop in VBA

    Please help me understand where my syntax is wrong here! I'm a beginner in vba but am learning fast. I'll try to simplify the problem below. I have created an array called myArray(). It has 5 values, 1,2,3,4, and5. I've confirmed the array was created successfuly. I then have a loop where h is...
  12. A

    VBA Extract Column Data to Populate Table

    Basically I have the following data that I want to put in a table as shown in the second quote. I would like to write some code that checks "Header, Mis and Veh" if each one matches to the corresponding line in Table2, it places Answer in that cell. For example, for (String2, 1, 52) (Header...
  13. R

    Do I need a nested for Loop?

    Hi, I am hoping to get pointed in the right direction. I am going to attempt to write a macro with three sheets. Transactions, Accounts, and Output. On the transactions tab all of the companies with company ID (col A), the transaction amount (col E), Description (col D) and date (col B) will...
  14. Z

    More than 7 nested if loops.

    Hey, I am aware that excel does not allow more than 7 nested if loops. This is my current formula. I've just realized that my formula has to continue in this pattern up to 15 times. Any ideas on how to make it work...
  15. S

    nested do-while loop

    I have multiple folders(level 1) with folders (level 2) in them. I want to delete the level 2 folders (but not all of them). so I want to go in to folder 1 and delete folders a-g (but not h-z), then move to folder 2 and repeat the same thing. I have the list of the folder1's in column a...
  16. T

    Solver, GoalSeek?????

    Hello! I am hoping that someone can help me with my dilemma. I currently have a spreadsheet that will calculate the fair market values of an asset and compare to the book value of that asset to determine if the asset is financially upside down or not. I need to determine the month where the...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top