+ Reply to Thread
Results 1 to 6 of 6

Using Formulas ia a code

  1. #1
    Forum Contributor
    Join Date
    09-09-2009
    Location
    Columbus. Ohio
    MS-Off Ver
    Excel 2000
    Posts
    199

    Using Formulas ia a code

    I have the attached sample working well with the exception of being able to insert formulas along with the other data.

    The formulas and explanation of their use are included in the sample. Any help would be appreciated.

    JIm O
    Attached Files Attached Files
    Last edited by Jogier505; 02-21-2011 at 02:03 PM.

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,757

    Re: Using Formulas ia a code

    Not sure why you want to do this in code instead of using formulas, since you have already defined the formulas. Nevertheless, maybe something like this, same order as listed in your worksheet:
    Please Login or Register  to view this content.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Using Formulas ia a code

    Something like....????

    Please Login or Register  to view this content.
    Martin

  4. #4
    Forum Contributor
    Join Date
    09-09-2009
    Location
    Columbus. Ohio
    MS-Off Ver
    Excel 2000
    Posts
    199

    Re: Using Formulas ia a code

    Maybe I wasn't clear in my first post. I have the code that 'mrice' has suggested already in place but it will not pick up the formulas from the appropriate cells. I think that somehow I need to have the formulas in the code to start with so they will automatically be inserted with the rest of the data. Another issue is that if I try to put the formual into the cells on the Input Page I get a circular reference. I think I need a cross of the two answers, but I lack the expertise to pull it off.

    Jim O

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2404
    Posts
    24,757

    Re: Using Formulas ia a code

    Well, apparently I have no idea what you're trying to do. I see that your code copies a column from Input and pastes it as a row into All Data. That seems to work fine. However, what you're doing with the formulas is unclear. Why don't you just put the formulas themselves as shown in column F into the cells in column B where indicated? Then the copy and paste will put the values from the formulas into the next row of All Data.

    By the way I would suggest that you qualify the range reference to Input as
    Please Login or Register  to view this content.
    because as written it copies from the active sheet. Your code does not guarantee that Input will be the active sheet.

    I would also suggest adding
    Please Login or Register  to view this content.
    after the paste, which will turn of the "marching ants."

  6. #6
    Forum Contributor
    Join Date
    09-09-2009
    Location
    Columbus. Ohio
    MS-Off Ver
    Excel 2000
    Posts
    199

    Re: Using Formulas ia a code

    I Think I have it solved now. I changed the input from a column to a row, added the formulas in the cells and most important changed the code to PasteSpecial Paste:=xlFormulas, _, not PasteSpecial Paste:=xlValues,.

    6StringJazzer, Thank you for your input with the code. Slowly I am picking up bits of information. Someday, it may finally sink in!

    I want to thank you both for your time and help with this issue.

    JIm O

+ 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