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 strongm 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: vba317
  • Order by date
  1. vba317

    Need to read contents from cell

    I have changed the code to the following and it works great. Thanks !!!!! For c = 2 To x Range("B" & c).ClearContents For i = 1 To 5 Range("B" & c).Value = Range("B" & c).Value & ActiveWorkbook.Worksheets(c).Cells(1, i).Value & " " Next Range("B" & c) = Left(Range("B"...
  2. vba317

    Need to read contents from cell

    Skip, I tried your formula but I am getting a compile error. Argument not optional I have highlighted what is causing the error. For c = 2 To x Range("B" & c).ClearContents For i = 1 To 5 Range("B" & c).Value = Range("B" & c).Value & ActiveWorkbook.Worksheets(c).Cells(1...
  3. vba317

    Need to read contents from cell

    OK, it might not be the best way but I figured out how to combine all the contents into one cell. Sub wrkbkSheetName() Dim mainworkBook As Workbook Dim i As Integer Dim c As Integer Dim x As Integer Dim strHeader As String Dim strCell1 As String Dim strCell2 As String Dim strCell3 As String...
  4. vba317

    Need to read contents from cell

    No, I want to read columns A -E in Row 1. I was hoping to get the results in one cell separated by a space. Maybe that isn't possible. I found a way to put the information into separate cells. Sub wrkbkSheetName() Dim mainworkBook As Workbook Dim i As Integer Dim c As Integer Dim x As Integer...
  5. vba317

    Need to read contents from cell

    I have got some of the macro to work. Right now it is reading the first cell from the worksheets into the cell in the table of contents. What can I do to have it read the contents of all 5 cells with a space between them? Tom Sub wrkbkSheetName() Dim mainworkBook As Workbook Dim i As Integer...
  6. vba317

    Need to read contents from cell

    I am trying to create a table of contents in my spreadsheet. I have a macro that I need to read the contents of cells A1:A5 of all the sheets in the workbook and put the contents of those cells with a space starting in column B2. I am getting no errors but no information is going into the column...
  7. vba317

    Macro to add sheet name does not work

    I am using excel 2010 . I figured out the initial error of my ways. I believe I have determined the correct formula but an interesting thing happens. When I first run the macro the code is entered into the center header and center footer but in order for me to get the page to read correctly I...
  8. vba317

    Macro to add sheet name does not work

    I have written a macro to add the sheet name to the header and the page number to the footer I can't get it to work. Any help would be appreciated. Tom Sub UpdateHeader() ' UpdateHeader Macro Application.PrintCommunication = True Application.PrintCommunication = False With...
  9. vba317

    Delete specific part of a cell run-time error 438

    After adding the ascii value into combo's original code it works! Thanks you everyone for your input! Range("A3") = Left(Range("A3"), InStr(Range("A3"), Chr(150)))
  10. vba317

    Delete specific part of a cell run-time error 438

    After using the mid statement to isolate the - and using the code statement on my spreadsheet the code is 150.
  11. vba317

    Delete specific part of a cell run-time error 438

    Duane, I tried your idea and nothing gets deleted. Skip, I tried your idea and it deletes all the info in the cell.
  12. vba317

    Delete specific part of a cell run-time error 438

    I have tried this code but it deletes all characters in the cell. I did have to add another parenthses at the end to avoid a syntax error. Range("A3") = Left(Range("A3"), InStr(Range("A3"), "-"))
  13. vba317

    Delete specific part of a cell run-time error 438

    I am trying to delete a specific part of a cell with no luck. The cell is A3 on the sheet I am working on. The full string in cell A3 is JYC Internet                 (351) – includes. What I am trying to do is delete all characters after the - is this possible? Tom strChange =...
  14. vba317

    Copy and Paste from email to excel Workbook reaching max for cell wont copy more

    I just found out the data in the body of the email gets copied from the web. So I added another loop after your's and no more blank spaces. Column A is company sensitive but it is the text description and the number itself. Thanks so much for all your help. Tom For Each r In...
  15. vba317

    Copy and Paste from email to excel Workbook reaching max for cell wont copy more

    I didn't get any errors but it didn't work. Column B is the number that was generated by the code, Column C is the results of using the LEN function. For some reason I am still getting characters. Tom B C     669 7 (5,988) 5   9,051 7 18,895 5   5,710 7  2,368 6
  16. vba317

    Copy and Paste from email to excel Workbook reaching max for cell wont copy more

    OK, That worked one final thing, Now that I have the numbers in Column B they have different amounts of white space in front of them. I have tried different methods but nothing I am trying is working. For Each r In Range("B2:B7") r.Value = Replace(r.Value, "", "") Next r
  17. vba317

    Copy and Paste from email to excel Workbook reaching max for cell wont copy more

    I used your suggestion and it worked for my issue. I have copied the body of the email into an excel file. Now I need to extract the number from Column A and put the value into Column B. Currently what is happening is the text in Column A is being replaced with the value. Tom Dim ObjOutlook...
  18. vba317

    Copy and Paste from email to excel Workbook reaching max for cell wont copy more

    I am using Excel 2010 and Outlook 2010. What I am trying to do is copy the contents of an email into an excel spreadsheet. Currently I can pick the right email and I can copy and paste into the worksheet. The problem is the paste function is pasting into 1 cell instead of multiple cells. So I am...
  19. vba317

    Object loop isn't working

    Skip and Andy you both are correct it was my laziness. I try and designate what type of variable I am dealing with. Just started a new job and a little pressed for time. I want to send out a thank you to Skip, Andy and PHV, for all your help over the years you are truly MVP's!

Part and Inventory Search

Back
Top