Enter description next to a number

Panoos64

Well-known Member
Joined
Mar 1, 2014
Messages
890
Hi all, i would like to write a vba so that where in col. "D" the number start from number 92 and in col. "F" is the category "BEVERGAE" should place on number's right side "APERITIF" and if in col. "F" and it start from 92 should place "SPICES" and so on.

In sch.1. are the original data and in sch.2. is the expected result.

Many thanks in advance

SCH.1.
1DATETYPEREF.1REF.2TR. NOCATEGORY
2
3
4
5
6
7

<colgroup><col style="mso-width-source:userset;mso-width-alt:1462;width:30pt" width="40"> <col style="width:48pt" width="64"> <col style="mso-width-source:userset;mso-width-alt:1682;width:35pt" width="46"> <col style="mso-width-source:userset;mso-width-alt:2048;width:42pt" width="56"> <col style="mso-width-source:userset;mso-width-alt:3913;width:80pt" width="107"> <col style="mso-width-source:userset;mso-width-alt:3328;width:68pt" width="91"> <col style="mso-width-source:userset;mso-width-alt:4534;width:93pt" width="124"> </colgroup><tbody>
[TD="width: 40"][/TD]
[TD="width: 64"]A[/TD]
[TD="width: 46"]B[/TD]
[TD="width: 56"]C[/TD]
[TD="width: 107"]D[/TD]
[TD="width: 91"]E[/TD]
[TD="width: 124"]F[/TD]

[TD="class: xl65"]03-02-17[/TD]
[TD="class: xl66"]ISSUE[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]92145[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]BEVERAGE[/TD]

[TD="class: xl65"]10-05-17[/TD]
[TD="class: xl66"]ISSUE[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]92505[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]BEVERAGE[/TD]

[TD="class: xl65"]10-05-17[/TD]
[TD="class: xl66"]ISSUE[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]92800[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]BEVERAGE[/TD]

[TD="class: xl65"]10-05-17[/TD]
[TD="class: xl66"]ISSUE[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]92905[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]FOOD[/TD]

[TD="class: xl65"]10-05-17[/TD]
[TD="class: xl66"]ISSUE[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]92608[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]HOT BEVERAGE[/TD]

[TD="class: xl65"]10-05-17[/TD]
[TD="class: xl66"]ISSUE[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]92700[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]HOT BEVERAGE
[/TD]

</tbody>



SCH.2.
1DATETYPEREF.1REF.2TR. NOCATEGORY
2
3
4
5
6
7

<colgroup><col style="mso-width-source:userset;mso-width-alt:1462;width:30pt" width="40"> <col style="width:48pt" width="64"> <col style="mso-width-source:userset;mso-width-alt:1682;width:35pt" width="46"> <col style="mso-width-source:userset;mso-width-alt:2048;width:42pt" width="56"> <col style="mso-width-source:userset;mso-width-alt:3913;width:80pt" width="107"> <col style="mso-width-source:userset;mso-width-alt:3328;width:68pt" width="91"> <col style="mso-width-source:userset;mso-width-alt:4534;width:93pt" width="124"> </colgroup><tbody>
[TD="width: 40"][/TD]
[TD="width: 64"]A[/TD]
[TD="width: 46"]B[/TD]
[TD="width: 56"]C[/TD]
[TD="width: 107"]D[/TD]
[TD="width: 91"]E[/TD]
[TD="width: 124"]F[/TD]

[TD="class: xl65"]03-02-17[/TD]
[TD="class: xl66"]ISSUE[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]92145 APERITIF[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]BEVERAGE[/TD]

[TD="class: xl65"]10-05-17[/TD]
[TD="class: xl66"]ISSUE[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]92505 APERITIF[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]BEVERAGE[/TD]

[TD="class: xl65"]10-05-17[/TD]
[TD="class: xl66"]ISSUE[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]92800 APERITIF[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]BEVERAGE[/TD]

[TD="class: xl65"]10-05-17[/TD]
[TD="class: xl66"]ISSUE[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]92905 SPICES[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]FOOD[/TD]

[TD="class: xl65"]10-05-17[/TD]
[TD="class: xl66"]ISSUE[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]92608 COFFEE[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]HOT BEVERAGE[/TD]

[TD="class: xl65"]10-05-17[/TD]
[TD="class: xl66"]ISSUE
[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]92700 COFFEE[/TD]
[TD="class: xl66"] [/TD]
[TD="class: xl66"]HOT BEVERAGE[/TD]

</tbody>
 
Hi Marcelo, both of them work. I am sorry if i was bother you. As i said i wanted to improve my knowledge. Thanks once again. Have a nice day!
 
Upvote 0

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,021
Latest member
pingpong7117

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top