Search results

  1. HaHoBe

    Autosum macro for Excel

    Hi, china99boy, in Excel this could be achieved by using a loop like this: Option Explicit Sub AutoSumLoop() Dim lngColumn As Long Dim lngLastRow As Long For lngColumn = 1 To Range("A1").End(xlToRight).Column lngLastRow = Cells(1, lngColumn).End(xlDown).Row Cells(lngLastRow + 1...
  2. HaHoBe

    Centre Text in Cell around "-"

    Hi, Matt, just a tip ;) - maybe better use the Code-Tags next time to make the spaces visible (as HTML is not supported in this forum - so   will not be of any use): gegew-uudh ee-h dgdvgfdgg-d gsv-bgvdvcvdcdgsvcg gsv-bgvdvcvdcdgsvcg...
  3. HaHoBe

    View/Close Hyperlinked Hidden Worksheet

    Hi, Matt, you´re right with what you guess - if I put in a hyperlink it always reads something like SheetName!Range (Sheets1!A10). And it will only work with a link like that. If you altered anything in the code or the hyperlinks it´s hard to tell for me why th eruntime error occurrs (okay -...
  4. HaHoBe

    Lookup sheet name

    Hi, Steve, you may concatenate the names into one cell (= B3 & ", " & A3) in all sheets and then use VLookup. I would try and work around the John Doe problem by using another column with the personal number of each employee (or create one like 060506hb for somebody born today with first name...
  5. HaHoBe

    Lookup sheet name

    Hi, steve, try this one as an idea starting with cell A3 and drag the formula down (additional breaks added but not necessary in the formula): =IF(NOT(ISERROR(VLOOKUP(A3,'Female Compound'!A:A,1,0))),"Female Compund", IF(NOT(ISERROR(VLOOKUP(A3,'Female Recurve'!A:A,1,0))),"Female Recurve"...
  6. HaHoBe

    View/Close Hyperlinked Hidden Worksheet

    Hi, Matt, code goes into ThisWorkbook, name of visible worksheet has to be adapted if needed: Option Explicit Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal Target As Hyperlink) If Sh.Name = "TOC" Then With Sheets(Left(Target.Name, InStr(1, Target.Name, "!") - 1))...
  7. HaHoBe

    Centre Text in Cell around "-"

    Hi, Matt, the Replace-function does alright for me when calling it with Ctrl+H. ;) If you need the function in a cell to do so use =REPLACE(A1,FIND("-",A1,1),1," - ") Option Explicit Sub MattUsedRange() Dim rngCell As Range Const strSearch As String = "-" Const strNew As String = " - "...
  8. HaHoBe

    Protecting an Active Work Book

    Hi, AshikHusein, first get Environ("Username"), then do a Select Case with this value with something like With ThisWorkbook .Saved = True .ChangeFileAccess xlReadOnly End With for all those users who shouldn´t modify the workbook. Depending on the number of people I...
  9. HaHoBe

    Excel, Comment

    Hi, accessman2, please have a look at this code: Const cstrINV1 As String = "Invoice 1:" Const cstrINV2 As String = "Invoice 2:" Dim cmt As String Dim intStart1 As Integer Dim intStart2 As Integer Dim intCounter As Integer cmt = cstrINV1 & Chr(10) cmt = cmt & "Num: 1" & Chr(10) cmt = cmt &...
  10. HaHoBe

    Private Sub Workbook_Open()

    Hi, fulltime, if you mean the workbook it´s: yes. If you really mean the worksheet you should make good use of the Workbook_SheetActivate(ByVal Sh As Object) event. What about an inputbox in the code? Ciao, Holger
  11. HaHoBe

    Change the shape of the comment

    Hi, accessman2, you can record a macro to do so and get that to to run when the menu is checked... ? Make sure that the Drawing toolbar is visible. Left-Click the outer border of the comment, choose Draw, then Change Autoform. Ciao, Holger
  12. HaHoBe

    Listbox...

    Hi, Jaeden "Sifo Dyas" al'Raec Ruiner, as far as I know: no chance. Ciao, Holger
  13. HaHoBe

    variable number of columns in sum

    Hi, spock1971, to my opinion both the Indirect as well as the Address Function could be of good use for solving the problem without VBA. Ciao, Holger
  14. HaHoBe

    How to replace the character "?" in a cell??

    Hi, FT, maybe just do what is written in the help files? Option Explicit Sub FT() Dim lngCounter As Long Dim strValue As String strValue = ActiveCell.Value For lngCounter = 1 To Len(ActiveCell.Value) If Mid(ActiveCell.Value, lngCounter, 1) Like "[?]" Then Mid(strValue, lngCounter, 2) =...
  15. HaHoBe

    How to select the position of a picture when inserting Picture in MS Excel

    Hi, FT, as my old Excel97 does not support the Right corresponding to a cell you might take the following code to get the job done: Option Explicit Sub procInsertPictureFT() Dim strName As String Dim strPath As String Dim rngCell As Range Dim dblLeft As Double Dim dblWidth As Double Set...
  16. HaHoBe

    How to select the position of a picture when inserting Picture in MS Excel

    Hi, FT, might be wrong about this but to my knowledge you can only pass Left, Top, Width, and Height for a position. This will lead to finding the Left of the next cell to the right and the Width of the picture to get the Left starting point for the picture. And I pretty much doubt that it...
  17. HaHoBe

    Listbox...

    Hi, JaedenRuiner, as far as I know Excel will always take the cells above the ListFillRange (Sheet) or RowSource (UserForm) as the Column Header... Ciao, Holger
  18. HaHoBe

    dropdown class greyed out

    Hi, Peter, if you use the DropDown form Data/Validation it will always be visible if you select the cell. The DoubleClick should start a macro and fill the cell with a dropdown but I would prefer to start a userform instead of putting and clearing dropdowns in cells (frmPB21 is the name of that...
  19. HaHoBe

    A Stupid Qn

    Hi, fulltime, sorry about the misunderstanding. There is no way to my knowledge as the cell value gets shortened if there is anything (value or formula) inslde the next cell to the right. And the option Shrink To Fit will display the contents in no really readble height... The only way I know...
  20. HaHoBe

    A Stupid Qn

    Hi, fulltime, either drag the colum by holding the right borderline with the left mouse button pressed to the desired width, double click the border of that cell at the top line where the columns are indicated (cell pointer changes from an arrow to a different pointer which points into 2...
Back
Top Bottom