Creating a Range of Values to Plot

JP777

New Member
Joined
Apr 8, 2012
Messages
24
I am importing a text file and plotting some of its contents versus time. The file provides the end time and the step interval. I know that in Matlab you can define a set of values with the start, end, and interval, but I'm having a hard time figuring out how to do this with VBA. I have toyed with fill series, but no luck there.

Specifically, the file I'm reading in (a relay event file with voltages and currents) gives the maximum cycles as 15 and the samples per cycle as 16. Therefore, for each voltage or current sample, I need the time to show as 1/16, 2/16, 3/16, ..., all the way to 15 cycles. I have tried to manually do this and record the macro, but after I put in a few x/16s, when I try to extend the formulas down the rest of the cells, instead of continuing the trend (4/16, 5/16, 6/16, etc.), it repeats what I put in first. Any advice???
 

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
i just realized that you can't post attachments....

the step interval I want is 1/B6 (1/the value in B6 - 16), and I want it to end at D6 (the value in D6 - 15). the data should start on row 8 and end on row 247 (giving 15 cycles of data at steps of 1/16). when trying to fill data into cells, I tried to code it starting in Q8. This data will provide the time information needed to plot various voltages and currents vs. time. hopefully this helps clear things up enough to get a response...
 
Upvote 0

Forum statistics

Threads
1,215,200
Messages
6,123,612
Members
449,109
Latest member
Sebas8956

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