Hi,
Have a taken a look through the previous posts, but have not come across anything which sends me in the right direction, so if this has been covered, then a gentle point to the threads concerned would be appreciated, but...
I have a CSV based spreadsheet, that contains domain name DNS entries, for which I need to add a ton of new lines based on whether an existing line has the desired match information in it and I am pulling my hair our (what I have left of it) trying to work out the best method within Excel to achieve it.
My excel CSV will have tons of blocks as follows:
thedomainname.tld{
|ALLOW_TRANSFER| |xx.xx.xx.xx| || ||
|NS| |thedomainname.tld.| |ns1.nameserver.tld.| ||
|NS| |thedomainname.tld.| |ns2.nameserver.tld.| ||
|CNAME| |ftp.thedomainname.tld.| |cname.anotherdomain.tld.| ||
|CNAME| |mail.thedomainname.tld.| |cname.anotherdomain2.tld.| ||
|CNAME| |www.thedomainname.tld.| |cname.anotherdomain3.tld.| ||
|MX| |thedomainname.tld.| |mx1.mailhost.tld.| |50|
|MX| |thedomainname.tld.| |mx2.mailhost.tld.| |50|
}
and this would be repeated for each domain name....
What I need to achieve is for some formula to look through each line of the csv file and where it sees -
|CNAME| |mail.thedomainname.tld.| |cname.anotherdomain2.tld.| ||
create a new line below it with -
|CNAME| |smtp.thedomainname.tld.| |cname.anotherdomain4.tld.| ||
Where all of the resultant cname.anotherdomain4.tld will be the same for all, i.e. different from the 'thedomainname.tld, but all new lines will have the same in, and the domainname itself will differ from block to block.
In the end the resultant blocks for each domain listed in the spreadsheet would have -
thedomainname.tld{
|ALLOW_TRANSFER| |xx.xx.xx.xx| || ||
|NS| |thedomainname.tld.| |ns1.nameserver.tld.| ||
|NS| |thedomainname.tld.| |ns2.nameserver.tld.| ||
|CNAME| |ftp.thedomainname.tld.| |cname.anotherdomain.tld.| ||
|CNAME| |mail.thedomainname.tld.| |cname.anotherdomain2.tld.| ||
|CNAME| |www.thedomainname.tld.| |cname.anotherdomain3.tld.| ||
|CNAME| |smtp.thedomainname.tld.| |cname.anotherdomain4.tld.| ||
|MX| |thedomainname.tld.| |mx1.mailhost.tld.| |50|
|MX| |thedomainname.tld.| |mx2.mailhost.tld.| |50|
}
To be honest, not sure if formulas are possible for this and a macro is more likely, but again, beyond me, so if anyone has any suggestions, not after the solution (unless someone is able), but suggestions for me to work towards achieveing this, would be much appreciated.
PS: My excel is an old 2000 version if that makes any difference to the abilities I might be able to achieve with it.
Thanks for any suggestions, Mac
Bookmarks