1. D

    Passing an array to a recursive sub, best practice for optimization

    I have a table with Bill of Material information in four columns; Parent PN, Child PN, Quantity, Units of Measure. Given a parent part number as an input I am returning the "exploded" or "indented" bill of material. Essentially that means I am returning all the children of the parent, all the...
  2. D

    Outlook VBA - renaming outlook folders using find/replace code that references excel workbook/sheet: it converted all folder text to lowercase

    Hi Folks, Basic issue: I have a requirement to rename many outlook folders/sub-folders and I thought I'd found the perfect outlook VBA code; however, I have two issues with it 1) it's changing the case of my outlook folders to lowercase 2) It's doing part matches. Detail The code below...
  3. vds1

    Recursion VBA finding percentage

    Hello Everyone, Happy New Year Using the below table i would like to determine % of corp and % of Ind mentioned in column E and F. if the flag is Corp then Corp% is 100% if the flag is Ind then Ind% is 100% Above two cases are simple and straight forward. But when the flag is fund then the...
  4. S

    Recursive lookup, get last, newest occurrence of a value

    Excel 2010 - I have data that is in the following format. It is sorted in date order, ascending. <b>Excel 2010</b><table cellpadding="2.5px" rules="all" style=";background-color: #FFFFFF;border: 1px solid;border-collapse: collapse; border-color: #BBB"><colgroup><col width="25px"...
  5. G

    Recursive call is causing error.

    The code is failing on the red marked line. Can someone please help me with it. <code> Private Sub Workbook_Open() Dim WS1 As Worksheet Dim WS2 As Worksheet Set WS1 = Worksheets("Sheet1") Set WS2 = Worksheets("Sheet2") Dim testCollection As Collection Dim SIZE As Integer, sortCol As Integer...
  6. B

    mergesort in VBA

    <tbody> 5 3 1 4 7 8 2 6 </tbody> I have a one line table of 8 numbers, and am trying to write code so that the output is a one line table of 8 numbers - yet they are sorted from 1- 8. is there any way to structure recursion in VB? any recommendations about solving this?
  7. Q

    Making Folder and Subfolder Search Recursive - Finding File Name matching Cell and Getting Path

    Hello, I've been working on this for hours, and I'm ready to ask for help. I'm a relative VBA beginner, and have been teaching myself over the past month. I know exactly what steps I want this program to take, but am having trouble implementing those steps in a way that is concise, because I...
  8. P

    Custom transposing of a column into rows using VBA recursion

    Hello, I have been scratching my head over this for a while but i can't seem to find the answer maybe because I have not done any recursive functions in a very long time :(. I have the following columns. <tbody> Begin Shape1 End Shape2 Begin Shape1 End Shape3 Begin Shape2 End...
  9. C

    Add Hyperlink Per Row For Each Subfolder

    Public FS As New FileSystemObject Public FSfolder As Folder Public subfolder As Folder Public i As Integer Public existingRange As Range '--------------------------------------------------------------------------------------- Sub updateProjects() Dim strStartPath As String Set...
  10. S

    Adapting VBA from Word to work in Excel

    Hello, I am a total novice when it comes to VBA. I have been using a macro in Word created from pieces all over the internet (credit to a user named matt198992 for recursion script). The code prompts a user for folder, then runs a macro called PublishasPDF to all word files in the...
  11. D

    Why doesn't a recursive program work?

    Hi I am trying to learn about recursive programs but when I write a really simple one - to sum numbers up to n - I get #VALUE! error. Can someone please tell me what i am doing wrong. Function mySum(n) Dim n As Integer Dim result As Integer If n <= 1 Then result = 1...
  12. M

    Help with VBA user defined function - iterate by date and multiply field of one table by another table

    My project is the conversion of an investment management decision-making tool from Excel to Access. I have two Access tables: [tbl_POSITIONS] records the closing value of each position held at market close daily: eg: 12/15/12, AIGTX, 41.17 [tbl_RETURNS] records the date and amount when...
  13. P

    Hyperlink cell values to files

    Hi, Each week I receive a list in excel with over a 1000 of numeric values, which need to be [hyper]linked to different pdf files located inside the same folder [ "C:\folder\"]. Last time, I had to do them by hand and that was not fun at all :laugh:. Could somebody please help me with a...
  14. B

    Noob Cant make a recursive function in vb for excel

    Hi, im trying to write a recursive function to reformat some data in excel. This is my first function i ever wrot using vb. I have used Scheme in school when learning how to write recursive functions. this is what i wrote Function f(cell) If cell = "" Then f = cell ElseIf...
  15. E

    Recursive Hierarchy Problem

    I currently have two columns of ids, employee and supervisor, and need to find what division the employee rolls up to based upon the division's Vice President. I initially have the VP ID and Division in two columns on the same sheet. If the initial supervisor is not found on the VP "table", then...
  16. J

    VBA Recursion: combinations of all elements of a 2D array

    Hi, I have a 2D array of size x times y containing texts. Each element may contain either: 1) some texts, 2) the underscore, or 3) nothing. Like this (x=3, y =4): "john" "_" "black" "peter" "" "blue" "mary" "" "" "" "" "" Now i'm looking for a way to 1) ignore empty...
  17. steve112

    Tree Data Structure from Excel Data

    I am trying to write a recursive algorithm in VBA that can read data from a table in an Excel range, for example: <TABLE style="WIDTH: 109pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=144 border=0 x:str><COLGROUP><COL style="WIDTH: 53pt; mso-width-source: userset...

Watch MrExcel Video

This Week's Hot Topics

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
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 "".
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