Consulting

Results 1 to 20 of 79

Thread: Creating a single Table with different formulas Excel VBA

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Exclamation Creating a single Table with different formulas Excel VBA

    Hi everyone! I just signed up today to ask for help from y'all. I am a newbie when it comes to VBA. I am literally new like I started just yesterday, y'know. Basically I am trying to create a single table with multiple formulas in it. I can't manually put the formulas because the list in the database sheet is dynamic.

    What I am trying to do is this:

    a.jpg

    Categories can be found on the database sheet. Number format of sub categories depend on their respective formats which are indicated on the other sheets.

    This is what I have so far: I got this idea from one of the threads here:

    Sub testing()
    
    Set Rng = Sheets("Database").Range("A1").CurrentRegion
    Set Rng = Intersect(Rng, Rng.Offset(1))
    MCategory = ""
    
    
    For Each cll In Rng.Cells
        MCategory = cll.Value
     
      Set Destn = Worksheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Offset(1)
      With Destn
        .Value = cll.Offset(, 1).Value
      End With
    Next cll
    End Sub


    I am only able to do the categories part, but I don't know how to do the formulas since they differ depending on whether it's for monthly/weekly and Main Category/Sub Category.

    I am using Windows 10 and Office 365 if that's something you need to know.

    Attached herewith is my sample file.

    Your gracious help is highly appreciated. Thank you so much

    PS: I also posted here at 1:51AM today:
    https://www.mrexcel.com/board/thread...l-vba.1131940/
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •