Jumat, 28 September 2012

Re: [ExcelVBA] Abbreviations to Words

 

Hi

Oops, I should have tested this :-

Cells(nRow, nFullNameColumn).Value = clxFruit.Item("key" & nAbbreviatedNameColumn)

I meant to write :-
Cells(nRow, nFullNameColumn).Value = clxFruit.Item("key" & Cells(nRow, nAbbreviatedNameColumn).Value)

By the way if you do this 100,000 times it will be slow.

If this is a problem then you can read the cell values into a 100,000 by 2 VB array, put the look-ups into the second column and then put the array back into Excel. So all the hard work is done in VB

I described this method in one of my other posts but will explain further if needed. (I am on my way out somewhere)

Regards

Derek +++

>________________________________
> From: Michael Trombetta <mickey11030@yahoo.com>
>To: "ExcelVBA@yahoogroups.com" <ExcelVBA@yahoogroups.com>
>Sent: Thursday, 27 September 2012, 12:39
>Subject: Re: [ExcelVBA] Abbreviations to Words
>
>

>Derek,
>
>Thank you, now I understand your use of "key", so I can move on to the next statement:
>
>Cells(nRow, nFullNameColumn).Value = clxFruit.Item("key"&nAbbreviatedNameColumn)
>
>I understand this statement is in a loop which increments nRow, and it is supposed to put into Cell(nRow, nFullNameColumn) the full name of the fruit whose abbreviation is in the abbreviation name column in nRow. 
>To be concrete, if nAbbreviatedNameColumn is Col A, and nFullNameColumn is Col B, when nRow is 7, I want the abbreviation in A7 to "translate" into the full name and put that name into B7. 
>
>
>I don't see how the right-hand-side of that expression points row 7.
>
>Thanks for your help,
>Mickey Trombetta
>
>[Non-text portions of this message have been removed]
>
>
>
>
>

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar