Hi Thant - were you able to get this issue resolved? If not, I found a great article on this and have implemented the solution on one of my forms.
http://sharepoint911.com/blogs/laura/Lists/Posts/Post.aspx?ID=144
Best of luck!
Thanks again for the help!
I ran the code without any edits, and the following was produced:
A B C D E
123456 a, b asdf, asdf qwer, qwer zxcv, zxcv
789456 c, d fdas, fdas rewq, rewq vcxz, vcxz
If the values in column C - E are the same, I would...
I would also like to use this code to transfer more than just two columns we are comparing.
i.e.
Before Code
Column 1 Column 2 Column 3 Column 4 Column 5 ...
123456 a asdf qwer zxcv
123456 b asdf qwer zxcv
789456 c fdas rewq vcxz...
You're right! That's an important thing to mention! Won't happen again, my apologies.
Your help has been invaluable!
What do you think about the extra columns question?
Also, what if I wanted to take more columns from the original sheet?
Would I just add more statements to the 'with' portion of the code? I have a situation where I need to move 40+ columns of data. That seems like a lot of statements. of .Cells(lRow, iCol + 1) statements (if that's how ya do...
The only thing that I changed was
sOUT = sOUT & r.Offset(0, 1).Value & ", "
I added a space after the "," for easier reading of the new values.
Is this not a good way to accomplish my goal?
Thanks a bunch for the explanation.
I noticed that after the code executes it adds a "," after the last concatenated field.
i.e. the values look like the below table
Column A Column B
Record 1 a, b, c,
Is there a way to get rid of the comma after the "c"...
I messed with the placement of the EndIf statement, and I got everything to work.
I am still trying to get the hand of this, but I appreciate everyone's help and comments!
Here is the code BTW:
Dim wb As Workbook
Dim ws As Worksheet
Dim ws2 As Worksheet
Dim lngRowFrom As Long
Dim lngRowTo As...
I need to parse out 8 - 9 digit values with related numbers in other columns. For example:
Before Parse
Column A Column B Column C Column D
123456789, 987654321 a Apples Books
654987321 b Oranges Movies...
Figured out the issue described in my last post. However, the the function is still parsing the non numeric values to my output.
An example input is 987654321 (ABC)
In previous examples, using the IsNumeric function on an input such as this (when running Debug.Print "Not a Number") would...
DOH! Silly me forgetting the End If statement! Now I have a new problem. The values from column 2 - 5 are not being output when there is a delimited string.
Dim wb As Workbook
Dim ws As Worksheet
Dim ws2 As Worksheet
Dim lngRowFrom As Long
Dim lngRowTo As Long
Dim x As Integer 'Loop through...
In the following code, I am getting a next without for error after dropping in the 'If IsNumeric(strSplitter(x)) Then' line
Any ideas as to why? The 'Next x' has a corresponding 'For x'
Sub ExpandAIM()
Dim wb As Workbook
Dim ws As Worksheet
Dim ws2 As Worksheet
Dim lngRowFrom As Long
Dim...
1) Sheet = Sheet1
Range1 = Duplicate Values Column A
Range2 = Corresponding values tied to one value in column A (primary key for a lack of a better term)
2) Output to Sheet2 would be awesome if I could do that cell A2
Thanks for the suggestion! Unfortunately, I am trying to phase out MS Access of the process.
I found this code online, and it seems to do what I need. I am really confused as to how it works. I was able to modify where the new values print etc, but I was wondering if you could help me...
I have a Module in Access that does it for me currently, but I am looking to complete the action in Excel.
I tried to modify Hookom's code to satisfy my needs, but I was unable to do so successfully.
Here is the Access Module if you wanted to see it.
Option Compare Database
Function...
Hi Guys,
I am looking to concatenate duplicates in my worksheet. I looked at the concatenate code samples using the search feature, but I was unable to locate anything that directly applied to my situation. Example below:
Existing Table
Column A Column B
987654321...
Finally got it figured out. One more question, how can I validate strSplitter to make sure it is numeric? This was discussed earlier in the thread, but I am not sure where to place the IsNumeric function in the below code.
Sub ParseTest()
Dim wb As Workbook
Dim ws As Worksheet
Dim ws2 As...
I changed the "to" columns in the Else statement to 5 and 6 (respectively), and the code "printed" the values only immediately before any values with delimiters.
i.e. See below:
Before Parse
Column A Column B
123456789, 987654321 a
654987321...
Good news, I think that I got most of it to work, but I am seeing the code freeze and am having to break at the second loop.
Sub ParseTest()
Dim wb As Workbook
Dim ws As Worksheet
Dim lngRowFrom As Long
Dim lngRowTo As Long
Dim x As Integer 'Loop through the array
Dim strSplitter() As String...
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.