Search:

Type: Posts; User: Darren Bartrup; Keyword(s):

Page 1 of 6 1 2 3 4

Search: Search took 0.08 seconds.

  1. Re: copy data from Sheet1 to sheet2 and Paste Data Below the Last Used Row

    The naming was fine, what it was referencing wasn't. "copySheet.Range("A:BE")" refers to whole columns.
  2. Re: copy data from Sheet1 to sheet2 and Paste Data Below the Last Used Row

    You tried to copy the whole column which is 1048576 rows and paste further down the sheet.

    For example; if you copy A1:A1048576 you're copying 1048576 rows. If you try and paste that into row 11...
  3. Re: copy data from Sheet1 to sheet2 and Paste Data Below the Last Used Row

    Try


    With copySheet
    .Range(.Cells(2, "A"), .Cells(.Cells(Rows.Count, "A").End(xlUp).Row, "BE")).Copy
    End With

    Change '.Cells(Rows.Count, "A")' to a column that has data on the last...
  4. Re: copy data from Sheet1 to sheet2 and Paste Data Below the Last Used Row

    Something like:


    Private Sub Test()

    Dim copySheet As Worksheet
    Dim pasteSheet As Worksheet
    Set copySheet = Worksheets("New")
    Set pasteSheet = Worksheets("Combined")
  5. Re: copy data from Sheet1 to sheet2 and Paste Data Below the Last Used Row

    I take it you're getting a Copy area and paste area aren't the same size. Range("A:BE") are whole columns. Only copy the required range - rows 1:1048576 won't paste into rows 1000:1048576 manually...
  6. Replies
    15
    Views
    2,968

    Re: It was twenty years ago today...

    Excel really started to click when I joined this site.

    Your email has a date error though - you posted your first answer today?
  7. Replies
    9
    Views
    541

    I've been sent a 3D Pie Chart.

    Dear Forum,

    I've been sent a 3D Pie Chart and the sender is too far away to slap.... what should I do?

    I want to ask the sender about the size of two of the slices - they look pretty much the...
  8. Replies
    22
    Views
    23,663

    Re: VBA Numbers only in Textbox

    Sorry I didn't reply earlier Rick - I'm 5 hours ahead, so was getting ready to head home.

    That question mark did the trick, just in time for me to say it's all working on my conference call in an...
  9. Replies
    22
    Views
    23,663

    Re: VBA Numbers only in Textbox

    Thanks for the reply Rick.

    Unfortunately, it's not working.

    "1%" like "*%*" is returning TRUE and so is "1.1%" like "*%*"
    - so the code executes the .Text = LastText line and removes the %...
  10. Re: Using Named Ranges in a Macro to open sheets

    This code will check the sheet exists before making it visible.

    Sub Test()


    Dim rCell As Range

    For Each rCell In Range("Steve")
    If WorkSheetExists(rCell.Value) Then
    ...
  11. Replies
    22
    Views
    23,663

    Re: VBA Numbers only in Textbox

    Resurrecting this post again.... sorry.

    I've been using the Like operators from this post to limit entry to a userform textbox to numbers with a maximum of two decimal places (I don't think it was...
  12. Re: ActiveControl within a frame on a form.

    That was handy. Google sent me to the same solution ten years after I first asked. :)
  13. Replies
    12
    Views
    1,217

    Re: I love it when...

    Rick - that happens all the time at work even when I push for more information. Love it. :D
  14. Replies
    1
    Views
    221

    Re: Data Mismatch type

    Check the Account, Document Number and Net Due Date fields. When using VAL a Data Type Mismatch error is returned if the field is NULL (don't think it does if it's text rather than a number - just...
  15. Re: Stepping through restricted (date & unread) Outlook mail items (VBA from Access or Excel)

    Welcome to the board.

    Not sure why my original code isn't working - I haven't got 2016 so can't test.

    This code should work. Place it within a normal VBA module in Outlook.

    Public Sub...
  16. Replies
    2
    Views
    129

    Re: adding time

    In cell K1 use the below formula and format as time:

    =SUM(G1,0.0138888888888889)
  17. Replies
    8
    Views
    650

    Re: Get random top n percent by group

    Finally figured it out. Found an example that worked here: SQL(DML) help: How to select TOP N rows from a table for each group?

    I've had to update the previous query to it - ID MOD AuditSize = 0...
  18. Replies
    8
    Views
    650

    Re: Get random top n percent by group

    I wish it was that easy - but can't use a parameter in the SQL to select the top x.

    It would have to use something like SELECT TOP (SELECT AuditSize FROM tbl_TeamMemberSampleSize WHERE....).* FROM...
  19. Replies
    8
    Views
    650

    Re: Get random top n percent by group

    Slowly getting there - the requirements have changed a little since I realised I was forgetting one small point:
    I need to extract a percentage of records for each team member, for each week...
  20. Replies
    8
    Views
    650

    Re: Get random top n percent by group

    Thanks Xenou. I'll have a play around and post back if I get the solution - think the correct syntax is A MOD K as in SELECT 5 MOD 10 returns 5.
  21. Replies
    8
    Views
    650

    Get random top n percent by group

    Hi all,

    I need to extract a percentage of records for each team member from an original raw data table.

    My raw data doesn't have a natural key, but can add an auto-number if needed.

    All the...
  22. Replies
    11
    Views
    499

    Re: button counter macro by row

    The code will delete all the buttons on the sheet and recreate them - so if a new row is added this will just rearrange everything to fit. You can run the code by selecting the 'View Macros' button...
  23. Replies
    11
    Views
    499

    Re: button counter macro by row

    This code will add two buttons to columns C:D, sized the same as the cells.
    It will update the number in column B when the buttons are pressed.


    Sub AddButton()


    Dim btn1 As Button
    ...
  24. Replies
    4
    Views
    164

    Re: Complex Changing to Percent

    No probs. Glad you got it working. :)
  25. Replies
    4
    Views
    164

    Re: Complex Changing to Percent

    Can't you just remove the *100 part of the formula and format the cell as a percentage?
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4