PDA

View Full Version : Just Testing. Tests of passing codes between Forums and Word



DocAElstein
02-01-2019, 12:24 PM
Tests Related to these posts:
http://www.excelfox.com/forum/showthread.php/2146-%E0%A4%AC%E0%A5%8D%E0%A4%B2%E0%A5%89%E0%A4%97-%E0%A4%95%E0%A5%8B%E0%A4%B6%E0%A4%BF%E0%A4%B6-%E0%A4%95%E0%A4%B0-%E0%A4%B0%E0%A4%B9%E0%A4%BE-%E0%A4%B9%E0%A5%88-%D8%A8%D9%84%D8%A7%DA%AF%D8%B2-%DA%A9%DB%8C-%DA%A9*Trying-Blogs?p=10131&viewfull=1#post10131




Option Explicit
' Some tests of passing codes between Forums and Word


Hello raghuprabhu
Welcome to excelfox

I do not fully understand your question.

For example you say … When I select an item in the form from the dropdown list …. ??
?? - I do not see any drop down list in your file.

For now I will just give you some ideas that may help you to go further yourself.

If you then still need some help, then I think you will need to explain a bit better exactly what you want.

If you or nobody else can help solve your problem, then I can take another look for you tomorrow:
I only have a little time now to give you some ideas… if no one else helps, and you still need help tomorrow, then please give more information about what you want, so that I can help further tomorrow



This is the test range that you have given: ( I have also enclosed your CurrentRegion
as given, for example by Range("A1").CurrentRegion )

_____ Workbook: Lists.xlsm ( Using Excel 2007 32 bit )
Row\Col
A
B
C
D
E

1
Group
Item Col A
Item Col B


2
1ItemG11ItemG11


3
1ItemG12ItemG12


4
1ItemG13ItemG13


5
1ItemG14ItemG14


6
1ItemG15


7
1ItemG16


8
1ItemG17


9
1ItemG18


10
1ItemG19


11
2ItemG21ItemG21


12
2ItemG22ItemG22


13
2ItemG23ItemG23


14
2ItemG24ItemG24


15
2ItemG25


16
2ItemG26


17
2ItemG27


18
2ItemG28


19
2ItemG29


20
3ItemG31ItemG31


21
3ItemG32ItemG32


22
3ItemG33ItemG33


23
3ItemG34ItemG34


24
3ItemG35


25
3ItemG36


26
3ItemG37


27
3ItemG38


28


29
Worksheet: Sheet2

You wish to somehow get this sort of output , based on the above test data:
_____ Workbook: Lists.xlsm ( Using Excel 2007 32 bit )
Row\Col
A
B
C

1
Name
Item
Comments


2RaghuItemG11


3VimItemG16Instead of ItemG16 use ItemG11


4AbhiItemG21


5BhanuItemG25Instead of ItemG25 use ItemG21


6JohnItemG34


7VickyItemG35Instead of ItemG35 use ItemG31
Worksheet: Sheet1

This is your explanation so far…._
_............... In sheet2 of the attached file, I have in column1 have group, column2 has items, column3 also has the same items, some of them missing.

When I select an item in the form from the dropdown list, I want the comment to be populated as shown. If the item selected from column2 is from group1 and is not in column3 then I want the comments column to be as shown.

In the next post I will give you some ideas….




https://wordtohtml.net/

https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vOQApTgb (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vOQApTgb)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vbihZ-7W (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vbihZ-7W)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vfmpSO0F (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vfmpSO0F)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vjfTJ7lX (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vjfTJ7lX)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vmq-LHHz (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vmq-LHHz)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vst3j_7i (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9c-vst3j_7i)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwBqjIR5 Nj (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwBqjIR5 Nj)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwBw8El0 r5 (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwBw8El0 r5)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwC63GbR uM (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwC63GbR uM)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwC9fyKZ do (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwC9fyKZ do)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwCEn8DB Qe (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bwCEn8DB Qe)
https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bw0Bey8g QO (https://www.youtube.com/watch?v=nVy4GAtkh7Q&lc=UgxJGNhWFZh2p5mK0XB4AaABAg.9bbxud383FI9bw0Bey8g QO)
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA (https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA)

DocAElstein
04-02-2019, 03:04 PM
test askjhfaskjhaskjhfkjashfkjhsfkjhafkjhaskjfjaskfh

ASLJJSA


ASFJSAKHASHF


AKHASKJFH

These are just some ideas to get you started.

I will give you a routine which will give you an array, arrOut() , like this

Group Deafault item
1 ItemG11
2 ItemG21
3 ItemG31

The routine is here:
http://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=11094&viewfull=1#post11094

Routine brief description

Rem 1
I get the current data region to which includes the first cell in worksheet "Sheet2"

Rem 2
I make an array, arrDtaIn() , of the data


Group
Item Col A
Item Col B

1ItemG11ItemG11

1ItemG12ItemG12

1ItemG13ItemG13

1ItemG14ItemG14

1ItemG15

1ItemG16

1ItemG17

1ItemG18

1ItemG19

2ItemG21ItemG21

2ItemG22ItemG22

2ItemG23ItemG23

2ItemG24ItemG24

2ItemG25

2ItemG26

2ItemG27

2ItemG28

2ItemG29

3ItemG31ItemG31

3ItemG32ItemG32

3ItemG33ItemG33

3ItemG34ItemG34

3ItemG35

3ItemG36

3ItemG37

3ItemG38


Rem 3
' 3a)
I make a string of the unique group numbers " 1 2 3 "

' 3b)
I make an array of the unique group numbers { 1, 2, 3 }

' 3c) - ' 3d)
I make and fill an array for output, arrOut()

Rem 4
I paste out that array for output, arrOut()

Results
For this input data, before
_____ Workbook: Lists.xlsm ( Using Excel 2007 32 bit )
Row\Col
A
B
C
D
E

1
Group
Item Col A
Item Col B


2
1ItemG11ItemG11


3
1ItemG12ItemG12


4
1ItemG13ItemG13


5
1ItemG14ItemG14


6
1ItemG15


7
1ItemG16


8
1ItemG17


9
1ItemG18


10
1ItemG19


11
2ItemG21ItemG21


12
2ItemG22ItemG22


13
2ItemG23ItemG23


14
2ItemG24ItemG24


15
2ItemG25


16
2ItemG26


17
2ItemG27


18
2ItemG28


19
2ItemG29


20
3ItemG31ItemG31


21
3ItemG32ItemG32


22
3ItemG33ItemG33


23
3ItemG34ItemG34


24
3ItemG35


25
3ItemG36


26
3ItemG37


27
3ItemG38


28
Worksheet: Sheet2

Now run routine, Sub DefaultItem() ( http://www.excelfox.com/forum/showthread.php/2056-Appendix-Thread-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=11094&viewfull=1#post11094 )

After running Sub DefaultItem()
_____ Workbook: Lists.xlsm ( Using Excel 2007 32 bit )
Row\Col
A
B
C
D
E

1
Group
Item Col A
Item Col BGroupDeafault item


2
1ItemG11ItemG111ItemG11


3
1ItemG12ItemG122ItemG21


4
1ItemG13ItemG133ItemG31


5
1ItemG14ItemG14


6
1ItemG15


7
1ItemG16


8
1ItemG17


9
1ItemG18


10
1ItemG19


11
2ItemG21ItemG21


12
2ItemG22ItemG22


13
2ItemG23ItemG23


14
2ItemG24ItemG24


15
2ItemG25


16
2ItemG26


17
2ItemG27


18
2ItemG28


19
2ItemG29


20
3ItemG31ItemG31


21
3ItemG32ItemG32


22
3ItemG33ItemG33


23
3ItemG34ItemG34


24
3ItemG35


25
3ItemG36


26
3ItemG37


27
3ItemG38
Worksheet: Sheet2

















https://wordtohtml.net/