the-bax
the-bax

Reputation: 5

How To Assign A Range to a String in VBA Excel

I have a column with dates in a table called Transactions in Excel. I have a column called transactions and I would like to iterate through the descriptions and assign them to a string. My test code is as below and I am getting a error 1004.

For i = 1 To Range("Transactions").Rows.Count
    ' Set group to the value returned from the DEscription Table
    strGroup = Range("Transactions[Description]")(i)
Next i

I need help i tried adding .Value at the end and it did not help anything

I want to basically search every cell in a particular column for specific words and if they match. Copy the text to a new column. So that's why I want to get every description as a string and then use it as a parameter in the InStr function

Upvotes: 0

Views: 609

Answers (1)

Nathan_Sav
Nathan_Sav

Reputation: 8531

maybe join(application.transpose(range("a1:a100").value)," ") not sure how it will perform at various sizes, but 100 rows was ok.

enter image description here

Upvotes: 2

Related Questions