+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    Registered User
    Join Date
    09-07-2009
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Saving userform to sheet

    Just tried it but the Rate column formula isn't working. If I select it I can see the formula in the top bar but the cell is blank. hm. If I write over it with a number the total does change so that part works!

    meeting someone for lunch but will be back soon.

  2. #17
    Forums Administrator royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    24,443

    Re: Saving userform to sheet

    Are you sure that the formula you provided is correct?
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
    Check out the free Excel Toolbar

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)


    Code Tags: Make your code easier for us to read

  3. #18
    Registered User
    Join Date
    09-07-2009
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Saving userform to sheet

    wayhey... it works! you were right, I forgot I changed one of the columns around.
    Thank you so much for your help!

    Ah, can I ask one more question please. As you maybe saw on the dummy I have a EXTRACTED sheet which I need to contani the same information as the DATABASE sheet but without the last 3 columns. I then need to find a way to email only the EXTRACTED sheet to the finance department. I don't know if I can do this by putting a send button which would save the single sheet as a new workbook to be sent. Or if I just have to get people to copy and paste it into a new document to send. Any ideas?

    thanks again
    Z

  4. #19
    Forums Administrator royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    24,443

    Re: Saving userform to sheet

    There's plenty of email/excel VBA code here.

    Copying the relevant data isn't difficult
    Code:
    Sub Extract()
        Dim rng    As Range
    
        Sheets("Extracted").Cells.Clear
        With Sheets("Database")
            Set rng = .UsedRange
    
            rng.Resize(rng.Rows.Count, _
                       rng.Columns.Count - 3).Copy Sheets("Extracted").Cells(1, 1)
        End With
    End Sub
    To avoid errors unmerge the cells on the Extract sheet & try to avoid using them in future.
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
    Check out the free Excel Toolbar

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)


    Code Tags: Make your code easier for us to read

  5. #20
    Registered User
    Join Date
    09-07-2009
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Saving userform to sheet

    Ok thanks for the link to the email stuff.

    With regard to the code you gave, where is it that I enter the columns that I'm wanting to extract - columns A to N ?

  6. #21
    Forums Administrator royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    24,443

    Re: Saving userform to sheet

    I've adjusted the code, it was copying the correct number of columns
    Code:
    Sub Extract()
        Dim rng    As Range
    
        Sheets("Extracted").Cells.Clear
        With Sheets("Database")
            Set rng = .UsedRange
    
            rng.Resize(rng.Rows.Count, 14).Copy Sheets("Extracted").Cells(1, 1)
        End With
    
    End Sub
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
    Check out the free Excel Toolbar

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)


    Code Tags: Make your code easier for us to read

  7. #22
    Registered User
    Join Date
    09-07-2009
    Location
    Bristol, UK
    MS-Off Ver
    Excel 2003
    Posts
    19

    Re: Saving userform to sheet

    It works : D And just in time for half 5...

    Thank you so so much for your help!

  8. #23
    Forums Administrator royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    24,443

    Re: Saving userform to sheet

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
    Check out the free Excel Toolbar

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)


    Code Tags: Make your code easier for us to read

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.2.0