Posts by Simon Lloyd

    Re: Hwo To Find Day Of The Week As Text

    Firehorse, i know this sounds a bit lame but for your other questions you will have to start a new thread! as they are a different topic, it's the rules of this forum i'm afraid!

    Glad your sorted on the date front anyway!

    Re: Identify Duplicates Between 2 Columns Of Different Sheets

    Look have a play around with the Offsets and the Rng & Rng1 changing the lettering, you will see what is happening when you change them and run the code from there you should be able to work it out....believe me learning and sorting it out for your self is the best way to go as you will always keep that skill!

    Re: In Macro Code

    As long as you are setting mypath1 correct and my name this should work:

    Sub Macro2()
    Dim MyPath1 as string, MyName as string
    MyName = 'whatever
        strVar = mypath1 & "/" & myname & ".xls"
        Workbooks.Open Filename:=strVar
         MsgBox "Hello World"
    End Sub

    Re: Identify Duplicates Between 2 Columns Of Different Sheets

    Customers and orders now sorted!

    As for the rest figure it out!, you didnt't supply all that information when you requested a solution for which i spent my valuable free time....only to find you have changed the goal posts!

    Re: Protect All Sheets Then Close Workbook

    Use the macro recorder to produce the code you want for protecting a sheet then insert it in this!

    Private Sub Workbook_BeforeClose(Cancel As Boolean)
    For Each Sheet In Sheets
    Next Sheet
    End Sub

    this code goes in the ThisWorkbook module.

    Re: macro to runs when a user enters a value in the 'Numbers' column

    This should do what you want, place it in the Summary worksheet module (Alt+F11, the double click the summary sheet on the left hand side).

    Private Sub Worksheet_Change(ByVal Target As Range)
    Dim Rng As Range
    Dim i As Integer
    If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
     If Not Intersect(Target, Range("A2,A3")) Is Nothing Then Exit Sub
    Set Rng = Sheets(Target.Offset(0, -1).Value).Range("A1:" & Range("A65536").End(xlUp).Address)
    For i = 0 To Target.Value
    Rng.Copy Destination:=Sheets(Target.Offset(0, -1).Value).Range("A65536").End(xlUp).Offset(1, 0)
    Next i
    End Sub

    Edited the code to correct sheet after reading your update!

    Re: Identify Duplicates Between 2 Columns Of Different Sheets

    Ok try this:

    Re: macro to runs when a user enters a value in the 'Numbers' column

    I have looked at your file, you need to do a little more design work and explanation, if a user typed a number in the numbers column of the summary sheet lets say 3 opposite sheet2 what would that 3 mean to the macro? would it mean only copy the first 3 rows? would it mean find all number 3's...and if it was to copy multiple rows or a block of data how should that be shown on the summary sheet as you have sheet2 and directly underneath sheet3?

    Re: Biggest Loser

    Jugsy, welcome to Ozgrid, a quick word of warning, the rules here are strictly adhered to and a moderator may ban you from posting because your thread title doesnt explain what you are after, you need to go to Thread Tools and edit thread to change the title perhaps to Gains and Loss Calculations including percentages? or something along those lines, the reason for the strict thread title is for search purposes, had you typed thos particular words in the search box it will bring all those threads matching it giving you a perhaps faster and more varied solution, so it would help others in your situation.

    I am not a moderator at this forum but am at another and know how frustrated folk can get because they have had a post banned or deleted.

    Re: Identify Double Entries

    Highlight your enitire used range, give it a range name (say call it MyRange), then select conditional formatting and using formula is add this: =IF(COUNTIF(MyRange, A1)>1,TRUE,FALSE)

    Re: Increment Cell Value & Print Sheet At Each Step

    Perhaps you need it in the worksheet module (ALt+F11, then double click the name of the worksheet you want on the left hand side)

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Dim i As Integer
     Dim ib As Variant
     ib = Application.InputBox("Enter amount of increments", "Cell Progression", , , , , 1)
     If Target <> Range("J2") Then Exit Sub
        For i = 0 To ib
             Range("J2").Value = Range("J2").Value + 1
        Next i
    End Sub

    Re: Code Works In Break Mode , But Not Runtime

    Try it this way round:

    Re: Copy / Filter Data Based On Data In Column Occuring x Times

    if you prefer a code version, assuming your data is on sheet2:

    Re: Automatically Create Worksheets Based On Row Data

    something like: