• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Recent content by crouchsw

  1. C

    Filter Reserved character from Pivot table

    Try replacing ""MC"" with: CHR(34) & "MC" & CHR(34)
  2. C

    I cannot get Userform to auto populate a number for each entry

    Ok. Got it. Add this to the code that originally shows your userform: ... load userform1 ... rowcount=Worksheets("Sheet1").Range("A1").CurrentRegion.Rows.Count Me.labelcontrol.caption = format(rowcount,"00000") ' this would display the control number as 5 digits, with leading zeros ...
  3. C

    How to sum entries with same date and get average on month?

    You can use VBA to automatically refresh the data on calculate (you might change this to workbook_open() if it gets laggy: Private sub workbook_open() Sheets("Sheet1").PivotTables("PivotTable1").PivotCache.Refresh End Sub To the data, add a 'month' column (eg D2 formula =Month(A2) - you'll...
  4. C

    Macro not work in shard woorkbook

    I changed the "A"s to 1 and the "B" to 2 and moved the code to the "This Workbook" code area, (not in a module), and it worked just fine.
  5. C

    I cannot get Userform to auto populate a number for each entry

    Seems like it would work as is. From what you've written, you want to add some sort of control number to the form? Can it just be a sequential number? If so, just use the rowcount as your control number, and use the format command in VBA to pad it to 5 characters: Private Sub cmdOK_Click()...
  6. C

    VBA Auto Fill

    Did you mean E2? You just have a 0 in it. It will autofill with the same number (0,0,0, etc.). If you meant to calculate, then you should have =C2-D2 in cell E2. With that in place, the following code will do the autofill: Sub autofillblocks() Dim lastrow As Integer Dim range1 As String...
  7. C

    Daily Gantt Chart

    I would think that if it's something you've purchased, you should go to the company that made it. I thought you had your own spreadsheet.
  8. C

    Zero's before a number

    You could also use =TEXT(A1,"00000") or =TEXT(A1,"000") This will handle either 3 or 5 digit codes: =TEXT(A1,IF(LEN(A1)<4,"","00")&"000")
  9. C

    Daily Gantt Chart

    Can you upload your workbook?
  10. C

    Filling empty cells in a column

    activesheet.range("BA2").select if selection.value = "" then 'just in case BA2 is empty - I assume you want it filled as well, if it is selection.value = "Blah" 'or whatever you want here End if loop1: selection.offset(1,0).select if selection.value = "" then...
  11. C

    Selecting the next cell in a column using filters in a Macro

    ActiveSheet.Range("A2", Range("A65536").End(xlUp)).SpecialCells(xlCellTypeVisible).Select That will find the next visible cell below A1
  12. C

    Separate First and Last name

    if you can get the placement of the spaces done, then replace the 4th line of your code with this: mystring = application.proper(mystring)
  13. C

    Separate First and Last name

    The left() command gets the text starting at the left-most character, and going to the right for the number of characters specified - you have 1 specified, so it only grabs the left-most character. Unless everyone has the same number of letters in their first and last name, your code won't work...
  14. C

    Sheet Name keeps adding to Named formula

    So you want it without the 'SCH5'! prior to each cell reference in your if equations? I tried and cannot duplicate. Upload a sample so we can see what you're dealing with. If you need an easy way to remove part of the equation, use a replace all - press ctrl-F, choose replace, type 'SCH5'! in...
  15. C

    Write an If formula

    I used a custom function: Function grabcodes(RepName As String, data As Range) Dim rowcount As Integer Dim toprow As Integer Dim leftcol As Integer Dim topleftcell Dim repcodestg As String rowcount = ActiveSheet.Range(data.Address).Rows.Count toprow = Range(data.Address).Row leftcol =...
Back
Top