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...
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
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
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...
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...
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!
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.