Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Bass71
  • Content: Threads
  • Order by date
  1. Bass71

    Case Insensitive

    I'm looking to disregard case in the following code... I've tried UCase LCase, Option Explicit. Is there a simple way to "disable" this feature? Dim rng As Range, r As Range, iCol As Integer, i As String, j As Integer Set rng = Range([B2], [B2].End(xlDown)) i = InputBox("Type Text or Number to...
  2. Bass71

    Determine if String of Text is in a Cell

    I have the following code to iterate through ranges and determine if Variant i exists in any cell. For the most part, the cells have only one value, either matching i or not, but when there's more text in the cell than just i, I am sunk. Dim rng As Range, r As Range, iCol As Integer, i As...
  3. Bass71

    Variable Syntax in IF..THEN

    Hello, I'm trying to find the correct sytnax for the following... dim j j = InputBox ("Enter Logoff Time in Military Format") If SysTime > "# & j & #" Then...<<this doesn't and many other variations do not work>> However, if I write: If SysTime > #18:30# Then...<<this works>> How can I pass...
  4. Bass71

    Range Compare

    Is there a more sophisticated/streamlined way of writing the IF Then stated below, which determines if cells in Cols A-F are identical to the those in the following row and then iterates? For the life of me, I cannot get the Range, Set Range etc syntax down. This is what I've got and it works...
  5. Bass71

    Optimize Code

    Hello, I have the following code to determine if a cell is populated and if so, it cuts and pastes a range of text and then deletes the previous row. It seems as though there'd be a simpler way to accomplish this. If ActiveCell(1, 0).Value = " x " Then Range(ActiveCell...
  6. Bass71

    Summing Snare

    Hello In Excel VB, I'm trying to sum the numbers in a column which, depending on previous macros run, the row count will vary. The column has some blanks. I thought I'd try to Dim the row address variable and enter that into my formula: Dim k as integer ActiveCell.Value = ActiveCell.Address...
  7. Bass71

    Summing Snag in VB

    Hello In Excel VB, I'm trying to sum the numbers in a column which, depending on previous macros run, the row count will vary. The column has some blanks. I thought I'd try to Dim the row address variable and enter that into my formula: Dim k as integer ActiveCell.Value = ActiveCell.Address...
  8. Bass71

    Evaluating Strings in Range

    Hi; In a range of 1 X 6,I'm trying to hide rows those rows whose cells meet the criteria of either containing the string "PH" or a combination of nulls and "PH". Any other strings found in any given row, with or without nulls, would necessitate keeping row visible. Here's what I've got thus...
  9. Bass71

    Determine if Cells in Range meet Criteria

    I am trying to determine any of the cells in a range have the format <<interior.colorindex = 3>> THis is what I have now... Application.WorksheetFunction.CountA(Range(ActiveCell.Offset(1, 0), ActiveCell.Offset(7, 0))) = 0 Then However, this is not specific and so I imagine I need to replace...
  10. Bass71

    Find Matching Characters in Excel

    Hi, I'm trying to evaluate the first 5 characters in the activecell and the one right below, but lamentably the debugger doesn't like the <<Cells(2, 1).>> part of the statement. If Left$(Text$, 5) = Cells(2, 1).Left$(Text$, 5) Then... Thanks for your help RO
  11. Bass71

    Determine if Range contains distinct Value

    Hello, I'm trying to find the function that will determine if any cells in a range of 7 rows by 1 column contain ColorIndex 38. Instead of writing; If ActiveCell(2, 1).Selection.ColorIndex = 38 Or ActiveCell(3, 1).Selection.ColorIndex = 38 _ Or ActiveCell(4, 1).Selection.ColorIndex = 38 Or...
  12. Bass71

    Determine if Cells in Range are Blank

    Hi I'm trying to use variables to determine if a range of cells are completely null. For the life of me I cannot get it right. Dim i As Integer Dim j As Integer Range("U2").Select i = ActiveCell.Row j = ActiveCell(8, 1).Row If Selection.Interior.ColorIndex = 3 Then...
  13. Bass71

    Specify Number after Parameter

    Hi; I'm trying to create a query that outputs a group of dates 21 days prior to the date specified in parameter. In the criteria field, I'm trying to write something like.. [Enter Date Inquiry Sent]-21 Thank you..........RO
  14. Bass71

    VBA - Calculate Average in Range

    Hi, I'm trying to write code that will calculate the average of a range and evaluate output in If - Then statement. Range("P97").Select If Range(R[-5]C[-4]:R[4]C[-4]).FormulaR1C1.AVERAGE > .65 then... I realize after the R1C1 the logic disintegrates, but the attempt is evident. Thanks...
  15. Bass71

    How to count null values in Query

    Hi How can I show a Count output of null values in a select query? It simply outputs no records when attempting to count with Is Null in Criteria box. Thanks......RO
  16. Bass71

    Passing Variable through String

    Hi, I need to have a variable within a string. Are strings flexible enough to handle this? Instead of writing R2C4, I tried R + var + C4 but the output still treats it as text. Range("J2").Select Dim var As Variant var = 2 Do Until ActiveCell(2, 0).Value = "0.395833333333333"...
  17. Bass71

    Changing Message Box Button Default Focus

    Hi there: I have a macro in excel that formats a sheet and then saves it, replacing an existing file with same name. THe message box that pops up asks if I want to replace this file with YES-NO-CANCEL buttons. The NO button is always defaulted. Can I put a line of code previous to the SaveAs...
  18. Bass71

    Verifying Date Format in Excel

    Hello again: This simple syntax question is dogging me... I am trying to determine if a cell value is a date, but I cannot find the syntax. Among others I have tried: If IsDate(ActiveCell) Then... Thanks so much................RO
  19. Bass71

    Stopping Macro versus Pausing

    Hi: I'm am using the SendKey functionality to launch Excel attachments from Lotus Notes. Unless the last line of code is the launching of attachment, the spreadsheet does not open. It doesn't matter how long a pause I put in, the actual opening of the file doesn't happen if there's code after...
  20. Bass71

    Getting Excel to Give Lotus Note attachment focus

    I have what I think may be a Lotus Notes issue;but I am automating the printing of excel attachments from Lotus Notes. Using Sendkey function from exel macro, I have just about automated the whole process however, when I attempt to launch the attachment, (I need to print it) the focus always...

Part and Inventory Search

Back
Top