+ Reply to Thread
Results 1 to 11 of 11

Adding Value With Code To Sheet

  1. #1
    Forum Contributor
    Join Date
    03-18-2008
    Posts
    162

    Adding Value With Code To Sheet

    Hi,

    I want to display value from cell A11 to J11, and when the button is clicked, I need to transfer the value to underneath the last value on sheet “Results” leaving 1 space. So in my example it would go into row 28. On other occasions there may only be 1 value for example on results, if this was the case the row from Additional parts would have to display in row 7.

    Then if I were to add another value in additional parts I would then want this to display in row 30 in my example. So again leave a space and add the line.

    I have tried everything to do this, so if someone could help it would be much appreciated.

    Thanks,

    Leigh
    Attached Files Attached Files

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Where do you want to display the data?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor
    Join Date
    03-18-2008
    Posts
    162
    In this example I need the data to appear in row 28. But say for example if the value of row 25, 26 in the result page werent there I would need the data to appear in row 23.

    Hope this makes sence.

    Thanks

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,461
    Your code was close but was being hampered by non empty cells in Results sheet.

    You need to clear cells $B$27:$B$44 and then this code will work as described.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  5. #5
    Forum Contributor
    Join Date
    03-18-2008
    Posts
    162
    well this is the problem because I need the formula in these cells as the result page changes and each field could be full up to this cell.

    Thanks

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,461
    You only need to sort out column B which does not contain any formula.

    If you go to cell B11 on the results sheets and press END , DOWN_ARROW you will see the active cell becomes B44. If you cleaned that part of the sheet the code will work. Leaving the formula in column A intact.

    If not then try this revision
    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    03-18-2008
    Posts
    162
    Ok I'm still getting problems. I wont be able to use this formula because I will also have formulas in all other columns aswel down to cell 40, sorry for not including it in my example.

    Also when adding an item, if I then needed to add another so for example changed the name of the box and clicked add again, it over rights the previous add.

    If you put some make shift formulas in the other column's so that they also go to cell 40.

    Sorry for getting my example wrong.

    Hope you can help.

    Thanks

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,461
    Can you post an example that reflects your actual sheet.

    And try again to define the rules for how you know where to place the next record.

  9. #9
    Forum Contributor
    Join Date
    03-18-2008
    Posts
    162
    Ok I have problem. I have uploaded a revision to my example, to show how it is working.

    You will see that there is a formula of =additionalparts$K$155 in cell D11, so what is happening is it is copying the correct line accross but when I come to add another part it then copies this accross but the previously added part is reading the same cell.

    Is there a way to just display the value of K155 in D11 so that it just adds the name and no formula. Then it wouldnt over right each time

    Thanks
    Attached Files Attached Files

  10. #10
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,461
    Modify the final copy part.

    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    03-18-2008
    Posts
    162
    This is absolutely brilliant, you have been a great help.

    Thanks for your time.

    Leigh

+ 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