Creating a single Table with different formulas Excel VBA

AaliyahN82

New Member
Joined
Apr 24, 2020
Messages
8
Office Version
  1. 365
Platform
  1. Windows
Hi everyone! I just signed up today to ask for help from y'all. I am a newbie when it comes to VBA. 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:

1587749897930.png


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.

I haven't tried any macros at all because I am not sure where to begin. Here's a link to a sample file: sample file

Your gracious help is highly appreciated. Thank you so much :)
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
okay so here's what I have so far:

VBA Code:
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.

PS: I also posted here at 7:38PM today: Creating a single Table with different formulas Excel VBA
 
Upvote 0

Forum statistics

Threads
1,215,523
Messages
6,125,318
Members
449,218
Latest member
Excel Master

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