VBA code to select certain columns to use in formula

Alpacino

Well-known Member
Joined
Mar 16, 2011
Messages
511
Hi,
Is it possible to develop a code that only selects certain columns.
E.g. I have a table full of different Kpi in each row
Sales
Waste
Payroll
Going along the columns is wk numbers and I have set up a Formulas to find out Year to date figures in column E.
I want to break down the figures into periods (periods consisting of 5 weeks or 4 weeks) so I can find out how much each Kpi was for each period.
Is there a VBA code to use only weeks in a selected period (using data validation in cell D5
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
The beauty of vba code is that there doesn't have to be one - you can write it.

Thinking about it, if your week no. columns have the week ending date in them as well, you might be able to use a formula. Difficult to say without some idea of what the data looks like tho.
 
Upvote 0

Forum statistics

Threads
1,224,506
Messages
6,179,159
Members
452,892
Latest member
yadavagiri

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