+ Reply to Thread
Results 1 to 4 of 4

By increments

  1. #1
    Registered User
    Join Date
    07-23-2007
    Posts
    2

    By increments

    Possibly this should be in the charting forum, but it's not really about charts, more about data...

    I have been collected x-ray diffraction data for some powder samples. What this means is that I have data sets consisting of a series of angles between 2 and 90 degrees, with an absorption value for each angle. I import this information into excel, and I compare several different sets of absorptions on the same line graph. I have been forced to change the increment by which I measure angles from 0.01 degrees to 0.02 degrees - which means that I am not able to compare my new absorptions with my old ones on the same graphs, as the data sets do not line up. Is there a quick and easy way to arrange or modify my 0.02 incremented data so that it lines up with my 0.01 incremented? The only way I know to do this is to manually insert 4400 empty rows into every set of 0.02 incremented data (or delete every other row from my 0.01 incremented) and I am obviously not keen to do this! Or do I not even need to make it line up; is there a cunning way of using it as it is? I would be greatly obliged to anyone who can save me the pain of inserting or deleting upwards of 20000 rows, one by one...

    I hope that is all clear; if more or less detail is needed, do please say.

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by prince
    Possibly this should be in the charting forum, but it's not really about charts, more about data...

    I have been collected x-ray diffraction data for some powder samples. What this means is that I have data sets consisting of a series of angles between 2 and 90 degrees, with an absorption value for each angle. I import this information into excel, and I compare several different sets of absorptions on the same line graph. I have been forced to change the increment by which I measure angles from 0.01 degrees to 0.02 degrees - which means that I am not able to compare my new absorptions with my old ones on the same graphs, as the data sets do not line up. Is there a quick and easy way to arrange or modify my 0.02 incremented data so that it lines up with my 0.01 incremented? The only way I know to do this is to manually insert 4400 empty rows into every set of 0.02 incremented data (or delete every other row from my 0.01 incremented) and I am obviously not keen to do this! Or do I not even need to make it line up; is there a cunning way of using it as it is? I would be greatly obliged to anyone who can save me the pain of inserting or deleting upwards of 20000 rows, one by one...

    I hope that is all clear; if more or less detail is needed, do please say.
    Hi,

    to remove every second row you could use a spare column with =MOD(ROW(),2) then Filter the column on 1 (or 0) and Delete all displayed rows, or set a macro something like
    Please Login or Register  to view this content.
    hth
    ---

    note, the macro can be adjusted to insert rows and give a value of half the sum of the row before and the row after.

    ---
    Si fractum non sit, noli id reficere.

  3. #3
    Registered User
    Join Date
    07-23-2007
    Posts
    2
    Thank you, Bryan - the macro works very nicely. I can't pretend I understand such things, but it does what I need it to!

    Cheers,

    Adrian
    Last edited by prince; 07-23-2007 at 10:00 AM.

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by prince
    Thank you, Bryan - the macro works very nicely. I can't pretend I understand such things, but it does what I need it to!

    Cheers,

    Adrian
    good to see that it works for you. It simply gets the highest row number used (according to data in column A) and works backwards up the sheet stepping 2 rows and deleting 1.

    Thanks for your response.
    ---

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1