+ Reply to Thread
Results 1 to 3 of 3

Modify existing macro to include decimal and stop manual edit of macro

  1. #1
    Registered User
    Join Date
    12-16-2010
    Location
    Lynn, MA
    MS-Off Ver
    Excel 2003/2007
    Posts
    9

    Modify existing macro to include decimal and stop manual edit of macro

    Two things (sure one is quicker than the other):
    1. using macro below to sort and transcribe data from an acquisition log. Data is input as a string (e.g. 1244) in one column, and I'd like to automatically have a decimal put in each value as it sorts and transcribes, so that the final value in the "Target" worksheet is 124.4.
    2. when the acquisition system is adjusted, the acquisition log changes slightly (order of the tags in a column for a specific time). I manually have to edit the macro with the first tag of the data set, last tag of the data set, and the number of total tags minus one. Is there a way to automatically have the macro know, based on the time, the first tag, last tag, and # of total tags without the manual edit? You can see in the attached workbook that not all of the transcriptions worked because the total tag # changed during acquisition...
    test1.xlsm

    Thanks!


    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Modify existing macro to include decimal and stop manual edit of macro

    1.as far as converting the string value of 1244 into a decimal of 124.4 then =((Value(A1))/10) will first convert the string in A1 to a value and then divide it by 10 to input the decimal.

    2. Apologies, Im not sure what you mean in your second question, can you highlight the bits the manually amend and where you get the answers from?

  3. #3
    Registered User
    Join Date
    12-16-2010
    Location
    Lynn, MA
    MS-Off Ver
    Excel 2003/2007
    Posts
    9

    Re: Modify existing macro to include decimal and stop manual edit of macro

    1. I have roughly 30 data points, so I'm hoping that I don't need to make 30 additional columns (after the data has been sorted and organized) to place a decimal using a formula. I was hoping to be able to insert the decimal by using an addition to my existing macro.

    2. Can do! I receive the acquisition data as shown in the workbook, sheet "Original Log." I manually count the number of entry for a specific time period, e.g. for 10/30/14 17:00, there are 62 entries/values. I also have to take note of the first entry and last entry for that time stamp, e.g. EDR P4 (psi) [first entry] and EDR P4 (psi)_RD [last entry]. I manually edit the macro in the bolded, underlined places below... I have to manually type in the first and last entry titles in the first bolded area and the total number of values/tags in 3 places after that. I was hoping that there was a way so that I didn't have to manually edit the macro if the first and last entry tags changed or if the number of tags changed. Right now, every time the first and last entry tag changes or if the number of tags change, I have to manually edit the macro, and it only sorts/organizes the rows that fit that exact criteria.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro Code - Modify to include > or = to
    By SVTF in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-22-2014, 05:18 PM
  2. [SOLVED] Modify Macro Code to include an extra Pop Up with different trigger
    By SVTF in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-15-2014, 11:49 AM
  3. Edit existing VBA to remove duplicates and include conditional?
    By MargyHall in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-26-2013, 06:07 AM
  4. [SOLVED] Edit existing macro to include week change
    By adamsurpren in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-19-2012, 08:11 AM
  5. Stop Macro, Check Cells & Modify if Necessary, Resume Macro
    By AccountantCost in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-08-2009, 07:39 AM

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