Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Excel Help...again!!

  • 15-08-2005 1:22pm
    #1
    Closed Accounts Posts: 12


    Hi All...really sorry to annoy ye again with Excel questions..but last one (hopefully!!).

    All I want to do is record a Macro so that by pressing one key (or a Ctr + something) it will graph the selected cells. The problem is that the cell selection changes every time, while I can only record the macro to graph the original cells selected. If I don't specify the cells to be graphed then it selects the whole series.

    Any advice??

    Thanks a mill!!


Comments

  • Registered Users, Registered Users 2 Posts: 66,122 ✭✭✭✭unkel
    Chauffe, Marcel, chauffe!


    Monaou wrote:
    The problem is that the cell selection changes every time

    If your data is in columns, why don't you select the entire column while recording (or coding) your macro? Should be problem solved


  • Registered Users, Registered Users 2 Posts: 4,787 ✭✭✭prospect


    Not quite sure I understand what you want?

    Am I right in thinking:
    You have a large table of data, and you want to plot graphs from it on occasion. But the rows/columns may vary. And you want excel to 'predict' which rows/columns you want at any particular time?


  • Registered Users, Registered Users 2 Posts: 812 ✭✭✭neGev


    This is going to sound a little complicated, and I'm not sure if it's suitable for you but...

    Have a base spreadsheet (Base.xls) in which you have recorded your macro to take information (for the graphs) from the entire first sheet. Pivot tables might be the best way to do this.
    Every time you want to graph new information, put the information into the first sheet in Base.xls and run your macro to refresh your graphs/pivot tables.

    That's the simplest way I can describe it. If you want, PM me and I'll try to clarify further.


  • Registered Users, Registered Users 2 Posts: 812 ✭✭✭neGev


    unkel wrote:
    If your data is in columns, why don't you select the entire column while recording (or coding) your macro? Should be problem solved
    Unfortunately,that won't work. The macro will only record down to the end of the filled cells and not the entire column for some stupid reason.

    OP, you could possibly try modifying your macro in VisualBasic to go as far as, say, row 1000 which might *possibly* work.


  • Closed Accounts Posts: 12 Monaou


    Tried this Unkel, but what happens is that everytime you run the macro it just graphs the whole column - while what I want is to be able to select different groups of cells from within the one column and graph them eg. select cells 1 - 5 and graph them, or select cells 220 - 226 and graph them. I know I could just click on the graph tool each time, but I must do loads of graphs so just being able to press one key would make life a whole lot easier.

    Hope this explains it better.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 812 ✭✭✭neGev


    Are the cell groups always the same?


  • Closed Accounts Posts: 12 Monaou


    neGev wrote:
    Are the cell groups always the same?

    No, they vary all the time. Depending on the values it could be anything from a group of three upwards.


  • Registered Users, Registered Users 2 Posts: 812 ✭✭✭neGev


    So different cell groupings within the same column ?


  • Moderators, Arts Moderators Posts: 35,731 Mod ✭✭✭✭pickarooney


    You need to use Selection or SelectedCells (not sure this exists) or something in the code, if I understand correctly.


  • Closed Accounts Posts: 12 Monaou


    Ya, exactly....different groups of cells, but all within the same column of data......


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 812 ✭✭✭neGev


    Any chance you could do up a short example of what you're trying to do ?


  • Closed Accounts Posts: 12 Monaou


    Can try ya.....

    eg.

    1.1566
    1.1577
    1.1481 want chart of first three
    1.1395
    1.1371 want chart for first five
    1.1303
    1.1328
    1.1339 want chart from cells 1.1481 to this cell etc etc.
    1.1306
    1.1283
    1.1296
    1.1300

    The number of cells used each time for the chart will vary - no way to predict this beforehand....I will be selecting the cells to be used. All I want is a shorter way of graphing the selected cells than the standard way in Excel. Thought there would be someway I could record a Macro so that I could select a few cells and then press Ctr + key to get a graph of them.....beginning to think this is just not possible though!!


  • Registered Users, Registered Users 2 Posts: 812 ✭✭✭neGev


    How many cells would you typically be going through?
    You could create a permanent pivot table from the entire column the cells you're looking at are in and then each time use the pivot table to select those that you want. It'd just be a case of ticking the appropriate boxes in the pivot table.

    It's not much help but it's the only thing I can think of.


  • Closed Accounts Posts: 12 Monaou


    Thanks neGev,

    Think I have it sorted....found out you can just expand or move the area you want graphed by just dragging the box that's around the data when graphed. It's doing the job perfectly.

    Thanks for your help and time!!


Advertisement