recursion

  1. 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...
  2. 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"...
  3. 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...
  4. 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?
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top