Amending Date Range In a Formula From A Macro-UserForm

amish_z

New Member
Joined
Mar 5, 2015
Messages
13
Hi

So I will explain in more details, the following formula downloads data from Google Analytics for a certain period :

=Dump(GoogleAnalytics("ga:XXXXXXX","ga:adCost,ga:impressions,ga:adClicks,ga:CTR,ga:CPC,ga:goal7Completions","2015-02-03","2015-03-04","ga:campaign","","ga:medium==cpc;"",1,5000,FALSE,FALSE))

I want to create a button that can look up new date ranges I type in cells and enter them into the formula above, replacing the dates currently in it.

I will be entering the new date ranges in cells "A5" for start date and "A7" for end date.

I know it's quite a complex idea, but if any1 can help I'd be very grateful :)
 
How can I get VBA to not add ' to the cell I am using?

You are not using R1C1 style so change:
Rich (BB code):
ActiveCell.FormulaR1C1

to:
Rich (BB code):
ActiveCell.Formula
 
Upvote 0

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"

Forum statistics

Threads
1,215,385
Messages
6,124,626
Members
449,174
Latest member
Anniewonder

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