Use of Formula within macro

mwpaull84

New Member
Joined
Jan 6, 2014
Messages
6
Hi I'm wishing to use spreadsheet formula within a macro to get a desired result. I understand the concept of using a formula with a macro but having it work a little for complex i'm totally stuck!

My spreadsheet looks as follows (each individual has a tab like this one)

A B C D E F G
1
2 M T W T F Week
3 StatA x x x x x x
4 StatB
5 %A
6 StatC

The above is replicated 52 times to represent the 52 weeks in the year. Each of the 52 weeks is allocated against a month, i.e. week 1, 2, 3 ,4 is January etc (if a week has days that fall in two different months its 'allocated' to the month that has the most days of that week). This is detailed on another tab.

January 1 2 3 4
February 5 6 7 8
March 9 10 11 12 13

I've then got a further tab detailing 'stats'

So the stats tab looks like

Jan Feb Mar Apr May
Name1
Name2
Name3

What I want it to do is look at the month tab, recognise the weeks that are allocated against a specific month and then using that find those weeks in the individual tabs and take StatB away from StatA (say giving StatXY) and then compare StatC against StatXY to give a %. Input that % into the relevant month (from the months tab) against the relevant person.

All this is achievable via a fair bit of manual formula, wondering whether this achievable via a macro? The logic and concept is there (if i've explained it right).

Thanks.

Mark.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).

Forum statistics

Threads
1,223,903
Messages
6,175,284
Members
452,630
Latest member
OdubiYouth

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