Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Excel > Excel Programming

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 12-26-2018, 09:36 PM
ganesang ganesang is offline Windows XP Office 2016
Competent Performer
 
Join Date: Jul 2018
Posts: 125
ganesang is on a distinguished road
Default Need excel VBA to add xml tags

Hi Guys,



I need the VBA code which helps to add the code for the cell value.

Please see the example sheet attached here.

Please note that there is no limit for "INPUT" values which is exceeded more than 50 occurrences with separated by comma.
Attached Files
File Type: xlsx Sample_data.xlsx (11.1 KB, 10 views)
Reply With Quote
  #2  
Old 12-28-2018, 07:36 PM
Kenneth Hobson Kenneth Hobson is offline Windows 10 Office 2016
Novice
 
Join Date: Jun 2018
Posts: 27
Kenneth Hobson is on a distinguished road
Default

Code:
'=ParseCDD(J5)
Function ParseCDD(c As Range) As String
  Dim r As Range, a, i As Long
  a = Split(c, ",")
  For i = 0 To UBound(a)
    a(i) = "<categ no = " & """" & a(i) & """" & "/>"
  Next i
  ParseCDD = Join(a, vbNullString)
End Function
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to copy texts from excel and paste in to the Notepad++ in between the particular tags ganesang Word VBA 2 08-27-2018 02:05 AM
Updating old Tags caz46 OneNote 0 01-10-2017 04:19 AM
Is there a way to remove ALL Tags from a notebook? TheDm OneNote 0 08-25-2016 04:11 AM
Exporting Custom tags to PDF lervein PowerPoint 0 09-16-2014 08:55 AM
For Moderator: Code tags? Ulodesk Forum Support 1 07-12-2011 07:54 AM


All times are GMT -7. The time now is 03:18 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft