Search:

Type: Posts; User: AlphaFrog; Keyword(s):

Page 1 of 6 1 2 3 4

Search: Search took 0.53 seconds.

  1. Re: Code to Highlight / Un-Highlight Cells

    Your welcome.

    FYI: you could do this with a Table and Conditional Formatting.
  2. Re: Code to Highlight / Un-Highlight Cells

    This will use highlight blanks in your used range excluding Row 1. You don't have to Select anything.


    Sub foo()
    With ActiveSheet.UsedRange
    With .Offset(1).Resize(.Rows.Count - 1)
    ...
  3. Re: Code to Highlight / Un-Highlight Cells

    Sub foo()
    With Selection
    .Interior.ColorIndex = xlNone
    .SpecialCells(xlCellTypeBlanks).Interior.Color = vbRed
    End With
    End Sub
  4. Re: Use same value for a variable in a sub

    Why would x call ReturnPin again? ReturnPin is only called when it's explicitly listed in the code, and it only listed once. I think you're overthinking this.
  5. Re: Use same value for a variable in a sub

    Sub TestMatch()
    Dim x
    x = ReturnPin
    If x Mod 1111 = 0 Then
    MsgBox x
    End If
    End Sub
  6. Replies
    2
    Views
    59

    Re: New table if count is larger than 20

    There is a setting to repeat headers on every printed page.

    Print rows with column headers on top of every page
  7. Replies
    2
    Views
    68

    Re: Check file exist vba

    You want to check if any 16 character filename exists in a given folder?


    Function FileExists(FilePath As String) As Boolean

    If Right(FilePath, 1) <> "\" Then FilePath = FilePath & "\"...
  8. Re: Same Data (date) Validation List for 2 cells; 1 cells to be greater than other cell

    In this scenario...
    Range_Date is on Sheet1 and is the Data Validation list for Sheet2 A1
    Range_Date2 is on Sheet1 and is the Data Validation list for Sheet2 A2

    To start, Range_Date and...
  9. Re: Insert row, update total formula to include new row

    Then have the macro insert a row above the last row. The last row will shift down. Copy the last row to the newly inserted row above. Then paste new data in the last row.
  10. Re: EXCEL VBA Find Headers and Copy Column from Sheet 1 to Sheet 2

    Sub CopyData()
    Dim sws As Worksheet, dws As Worksheet
    Dim slr As Long, dlc As Long, c As Long, col As Long
    Dim colRng As Range, Rng As Range, Cell As Range
    Application.ScreenUpdating = False
    ...
  11. Re: Insert row, update total formula to include new row

    If you were to insert a row within I14:I20, the formulas would automatically expand to I14:I21 to accommodate the inserted row and keep the original cells.

    Have your formulas include one blank...
  12. Replies
    1
    Views
    103

    Re: Auto update cell price for inflation

    A1 has the base price for say year 2010 and the predetermined inflation rate is 5%

    This updates every year on Jan 1st

    =FV(5%,YEAR(TODAY())-2010,0,-A1)
  13. Replies
    2
    Views
    100

    Re: Offset Match Max - Priority Issue

    This is an array formula. Confirm with Control+Shift+Enter.

    =INDEX(A11:L11,1,MAX(IF(MAX(A12:L12)=A12:L12,COLUMN(A12:L12),0)))
  14. Replies
    3
    Views
    186

    Re: Ignore lines in a Macro

    Sub SORTDATA()
    'Sort Data on Seets PreK-Visitors

    If UCase(ActiveSheet.Name) <> "WORKERS" And UCase(ActiveSheet.Name) <> "VISITORS" Then 'Not "WORKERS" And Not "VISITORS"
    ...
  15. Replies
    3
    Views
    72

    Re: Checking if exists before executing

    Sub CreateJobCard()

    Dim lastRow As Long
    Dim thisRow As Long
    Dim nextRow As Long
    Dim sheetCount As Long
    Dim selectedCells
    Dim newSheet As Worksheet

    ...
  16. Replies
    3
    Views
    186

    Re: Ignore lines in a Macro

    it should be AND not OR.


    If ActiveSheet.Name <> "WORKERS" And ActiveSheet.Name <> "VISITORS" Then
  17. Re: Need row colour to be purple if a value is in a cell for each row

    Did you declare the variable at the top of the code like this?


    Dim RowColor As Long
  18. Re: TextBox validation working but one line of code is not executed...

    What does results in nothing mean?

    Did you do this?

    Private Sub tbnbna_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
    Select Case KeyAscii 'Typed character
    Case 32, 48 To 57,...
  19. Re: TextBox validation working but one line of code is not executed...

    EDIT to the code above: Add ASCII character 32 to allow a space.


    Case 32, 48 To 57, 65 To 90, 97 To 122 'Space, 0-9, A-Z, a-z
  20. Re: TextBox validation working but one line of code is not executed...

    Private Sub tbnbna_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
    Select Case KeyAscii 'Typed character
    Case 48 To 57, 65 To 90, 97 To 122 '0-9, A-Z, a-z
    Case Else
    ...
  21. Re: VBA to paste a formula till a specific number of columns to the right

    Sub MyFormula()
    Range("A2").Copy Destination:=Range("B2").Resize(1, Range("A1").Value)
    End Sub
  22. Re: TextBox validation working but one line of code is not executed...

    Use the _Exit event instead


    Private Sub tbnbna_Exit(ByVal Cancel As MSForms.ReturnBoolean)
    If Me.tbnbna.Value <> "" Then
    If Application.WorksheetFunction.CountIf(Range("A:A"), Me.tbnbna) >...
  23. Re: VBA Chart colour change using case select and wild card

    Try something like this...


    Sub ChangeMarqChartLColour()

    Dim x As Integer

    ActiveSheet.ChartObjects("Marq_ChartL").Activate

    For x = 1 To...
  24. Re: Dynamic Chart Works Great until I grab data from different Sheet

    How come you don't have the named ranges refer to the Data on Sheet2?
  25. Re: Need row colour to be purple if a value is in a cell for each row

    Maybe something like this (not tested)


    Sub cmdCopy()
    Dim wsDst As Worksheet, wsSrc As Worksheet, tblrow As ListRow
    Dim Combo As String, sht As Worksheet, tbl As ListObject
    ...
Results 1 to 25 of 150
Page 1 of 6 1 2 3 4