i have problem to use array,as new colekction,and as dictionari
in example file i want to know union name with result 72
how to calkulasi grup Objek in
1.array
2.colekction
3.as dictionari
i have problem to use array,as new colekction,and as dictionari
in example file i want to know union name with result 72
how to calkulasi grup Objek in
1.array
2.colekction
3.as dictionari
That's quite a lot to explain in single post.
And I'm not clear what you mean by following in your workbook.
Do you mean that you want to iterate through combination of Scor that will add up to 72? And output name combination and score in D3 & F3 down?How to input name in col B ,if result Col B.offset(,1) = 72 in col E (name) and result Skor in Col F
Also, see link for pretty detailed explanation on array, dictionary and other data structures.
http://analystcave.com/excel-vba-dic...ta-structures/
Hi,
Does the attached give you any help
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star icon below the post.
ck76 yes its right how i can do with array vba
Is order of Name important?
I mean do you consider A1+A2 same as A2+A1 or should it be considered separate result?
results of formula after run vba
Hm? You didn't answer my question... but here's sample using array & dictionary in conjunction. Assuming A1+A2 and A2+A1 is considered to be same combo.results of formula after run vba
And assuming only 2 number addition is considered...
Please Login or Register to view this content.
CK76
i want ask you if i dictionari to copi paste with criteria 72
is dictionari to run copi paste
is dictionary can run result as formula in F3.formula = "=C2+C3" etc
Last edited by daboho; 12-23-2016 at 05:57 PM.
Sure. Just change code to...
Please Login or Register to view this content.
CK76 veri interisting ,but is dict can do copi paste by exist referensi in col E****.png
is dict can do funtion like vlookup,or copi cell by referensi in col E ,and paste result in col F
i want know how if dict can run copi,function like find (dict() etc is posible ?
Last edited by daboho; 12-23-2016 at 10:05 PM.
I'm sorry but I'm having really hard time understanding what you are asking. Can you demonstrate step by step in the workbook?
if col E (referenci) Contain : E3 = A1,E5= A2,E7 = A5,E14 =A8
if in formula excel in F3 =vlookup(A3,B2:C9,2,0)
is vba dictionari can do it
if col E (referenci) Contain : E3 = A1,E5= A2,E7 = A5,E14 =A8
if in formula excel in F3 =vlookup(A3,B2:C9,2,0)
is vba dictionari can do it
dict2.png
is dict search criteria in col E and Value in Col F
if col E & i =B & i then
F & i = C & i
how to do with array or dict
Last edited by daboho; 12-24-2016 at 07:39 AM.
If you really want to learn about dictionaries.
http://www.snb-vba.eu/VBA_Dictionary_en.html
Arrays
http://www.snb-vba.eu/VBA_Arrays_en.html
Collections
http://www.snb-vba.eu/VBA_Collection_en.html
ArrayList
http://www.snb-vba.eu/VBA_Arraylist_en.html
Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.
@daboho
Ok so you are asking for VLOOKUP operation. That's quite a departure from your original question.
See link for how it's done. (See What about VBA? section)
http://analystcave.com/excel-vlookup...l-performance/
FYI - For small range you'd really have no benefit from it. I only use that type of code when there's about 400k rows and when Query/ADODB isn't suitable for one reason or another.
Last edited by CK76; 12-24-2016 at 12:10 PM. Reason: Typo
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks