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"...
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...
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...
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...
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...
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...
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...
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...
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)))
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"), "-"))
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 =...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.