# Off Topic > The Water Cooler >  > [SOLVED] Tags for Coloring Table cells for EXCELFORUM

## sourabhg98

Hello everyone!

This question is related to the "Insert Table" option at this forum.

I came around some tables in posts at this forum which were having colored cells.
I could not figure out the tags that have to be used for coloring the cells.

I inspected the script and this was all I could make-



```
Please Login or Register  to view this content.
```


But it does not work.

Could someone advise me what tags should I use so that  I can add color to the cells while posting answers at this forum?
Also there are some buttons to the right of "insert table" button. How can I use them? They seem to be disabled.

----------


## sourabhg98

Bump...No Response!  :Confused:   :Frown:

----------


## FDibbins

I believe the color comes from a macro that the guys here - and elsewhere - built for that purpose, it is not a forum feature

----------


## sourabhg98

Thank you for replying..

I saw some tables here - 



```
Please Login or Register  to view this content.
```


Post 4#, Post 10# ...

Is that some macro?

----------


## Debraj Roy

I guess those are Excel Jeanie
http://www.excel-jeanie-html.de/html/hlp_schnell_en.php

PS: Firewall got stronger after recent attack.. blocking HTML tages and codes..

----------


## FDibbins

No, this is the thread that contains the discussion...
http://www.excelforum.com/the-water-...w-printer.html

Take a look at post 179 from shg, that might be a good 1

----------


## Doc.AElstein

Hi Debraj Roy




> I guess those are Excel Jeanie
> http://www.excel-jeanie-html.de/html/hlp_schnell_en.php
> 
> PS: Firewall got stronger after recent attack.. blocking HTML tages and codes..



I think jeanie produces HTML code only ( or does it also do BB Codes ? )
HTML is switched off at Excel Forum so you cannot use that tool, I think ?
Alan

----------


## Doc.AElstein

Hi Ford,




> No, this is the thread that contains the discussion...
> ..........Take a look at post 179 from shg, that might be a good 1



I think you meant here in this massive Thread:

http://www.excelforum.com/suggestion...d-data-12.html

Alan

----------


## Doc.AElstein

*Hi Sourabh,*

Thanks for the PM asking for Help.
I did actually see your Thread and was considering to reply. - I have had some experience with and had just had a very small amount to do with the development of some of the Tools used to create those tables. Or rather i simply did some very minor modification to Tools I stole from other Forum members!

I have some problems getting access to the Forum just now. I will try to contact you again in the next few days to give more precise help if you need it. 

Just a couple of things for now:

_1) In order to produce the Tables I use in Forums, ( which are those you referenced ) , I use either 

*_a) an Add-In*
Or
*_b) a Code*

Once you have these ( a) Add-in installed or b) code in a Module ) you must do the following

_(i) You create the table you wish to put in the Forum post in an excel Spreadsheet.
_(ii) You select that complete Table
_(ii) you either a) *select the Add-In*  or  b) *Run The code*

You should then have the required BB Code within the Clipboard.

_(iv) in the Forum Editor you paste ( Ctrl V ) the BB Code in where you wish it to go in the post

_..............................................................................................

I suggest as a start that you browse through these Threads

http://www.mrexcel.com/forum/about-b...ml#post4197832
http://www.excelforum.com/showthread...445&highlight=
http://www.excelfox.com/forum/f13/bbcode-table-2077/
http://www.forumexcel.it/forum/16-te...ce-bb#post1576
http://www.excelforum.com/showthread...28#post4294228
http://www.excelforum.com/the-water-...m-threads.html

_.................................................................
 All the information needed to produce any tables i have ever presented anywhere you will find here.

https://app.box.com/s/zhz7awdag4nl1zs6564s9zzcwp50e4w9
https://app.box.com/s/l0rhp4ilndvyrks4ncszcfn7n22x8b7m

But they are just my rough notes and Files. The information is not well explained, so you may not understand anything at this stage.
But have a quick look. If you have any more questions Post them here. I will try to contact / reply should you still need help in a day or two.

*Alan,*
_...................................................

P.s.

Here an abstract of one of the many Add-In or Code produced tables

You see in the Editor Window this:

[color=lightgrey]Using Excel 2007[/color]
[size=1][Table="width:, class:head"][tr=bgcolor:skyblue][th][COLOR=black][sub]Row[/sub]\[sup]Col[/sup][/COLOR][/th][th][CENTER][COLOR=black]A[/COLOR][/CENTER][/th][th][CENTER][COLOR=black]B[/COLOR][/CENTER][/th][/tr]
[tr=bgcolor:#FFFFFF][td=bgcolor:skyblue][CENTER][COLOR=black][b]1[/b][/COLOR][/CENTER][/td][td=bgcolor:#B8CCE4]Hallo [/td][td=bgcolor:#FCD5B4][CENTER]Sourabh[/CENTER][/td][/tr]
[/table][/size][Table="width:, class:grid"][tr][td][b]Leith2[/b][/td][/tr][/table]


This is how it looks in the Thread

Using Excel 2007
Row\Col
A
B

*1*
Hallo
Sourabh


*Leith2*



If you wish to construct the table manually without an Add-In or Code, then you may see enough information in there to work out which BB Code tags you need to use, *for example I just tried a quick wonk:*

In Editor what you Type:

[size=1][Table="width:, class:head"][tr=bgcolor:skyblue][th][COLOR=black]Wonk[/COLOR][/th][/tr]
[/table][/size] 



In Post what you get

Wonk




*... seems to Wonk good!*  :Wink:  :Smilie:

----------


## shg

Marcelo Branco, the originator of the add-in, recently made at change that adds support for cell color (the bgcolor tag). I added that to my version; it's at https://app.box.com/s/soezox25h3w0q5s4rcyl.

Rory (romperstomper) also has a version on his site, http://excelmatters.com/, that works around a bug in Windows 8 for the DataObject object.

----------


## sourabhg98

Hi Everyone,

Thanks you all for all the suggestions.

This was extremely helpful. I made a simple tool using your guidance.

Check attached.
This works for range A1:K21
Enter some data in this range, like I have entered in A1:B2.
Now, give some colors to these cells. You can even change the font colors.

After entering data click the GO button. Select your desired range for which you create the table. Like A1:B2 in this case.
The macro would automatically create the tags and the CODE would be automatically copied to your clipboard.

Paste the code in the posts at this forum.

Example-
Hey
This is amazing

WOW
Thank you everyone




This is great fun!!!

NOTE- Press "RESET" button if you want to use the tool again.
- This would work only for "STANDARD COLORS" in excel.

Thank you everyone. This wouldn't have been possible without your assistance.

----------


## Doc.AElstein

*Hi sourabhg98,*
                      I have just played with your tool  I got it up straight away. It is great. You have not really needed any of the information we provided, other than just that last quick Wonk of your tool to get the syntax correct. You have got your Tool up and running nicely by yourself. 
 You have given us a very nice simple alternative to producing a Screenshot in a Forum.
* Thankyou very much for making your Tool Public*
*  A quick Wonk* is sometimes all you need when you have the enthusiasm to then take it further as you have clearly done. 
 I think this will be a very useful tool, and clearly it can be developed to include all colours , different Fonts etc. A very nice compact tool. If you develop it further i am sure it will be a Tool that many people would like to have. Well done

*Alan*

P.s. If you wish to show your BB Code in a Forum Post, as I did in Post # 9  you simply enclose your

BB Code in two noparse BB Codes like this ( But with | replaced with the appropriate square bracket [ or ] )

|noparse|   The BB Code you wish to show here     |/noparse|


With no parse BB Code tags written like this but with square brackets gives this in the editor
|noparse|[size=2][Table="width:, class:head"][TR][th=bgcolor:Orange][COLOR=Black]Wonk[/COLOR][/th][/TR][/table][/size]|/noparse|

 And this in the post

[size=2][Table="width:, class:head"][TR][th=bgcolor:Orange][COLOR=Black]Wonk[/COLOR][/th][/TR][/table][/size]

Without the noparse BB Code tags you get this

Wonk




Alternativelly you can use the HTML or PHP Window  ( But not the VB code window, because at Excel Forum the VB Code Window accepts BB Code )






```

```





```

[size=2][Table="width:, class:head"][TR][th=bgcolor:Orange][COLOR=Black]Wonk[/COLOR][/th][/TR][/table][/size]

[noparse][size=2][Table="width:, class:head"][TR][th=bgcolor:Orange][COLOR=Black]Wonk[/COLOR][/th][/TR][/table][/size][/noparse] 



```






```
Please Login or Register  to view this content.
```


_.............................................................................................


Great.
I see Yous
did not
need any of
the 
Add-Ins
or 
Codes.


In fact
it was just
a quick
Wonk 
that 
was
needed
so 


as to
get 
that
little 
bit
of 
Syntax
Correct


Actually
Yous 
have done
all the 
work
yourself
and
given


us
a very nice
Tool.
Thankyou for
making your
Tool 
here 
Public


I am
glad that
that last 
quick Wonk
on your
Tool 
got it
up.

----------


## sourabhg98

Thank you for the appreciation!!  :Smilie:  This won't have been possible without your support! I will certianly build upon the tool further to incorporate some more features and colors.

Also, I just realized the need for "noparse" as soon as I sent the PM to you. I actually intended to send the BB code in the PM but later when I viewed the message sent I realized that it had changed to table form instead of the code.

Thank You again for the quick tip.

Testing "noparse"-
[size=2][Table="width:, class:head"][TR][th=bgcolor:Orange][COLOR=Black]Wonk[/COLOR][/th][/TR][/table][/size]

Edit- Works Great!

----------


## Doc.AElstein

@ Sourabh, ( And anyone using *XL 2007* )
Hi Again
  I noticed you are using XL 2007. Just in case you want at some time to look at the Codes given by SG in Post in post #10




> ...... I added that to my version; it's at https://app.box.com/s/soezox25h3w0q5s4rcyl.
> ....
> Rory (romperstomper) also has a version on his site, http://excelmatters.com/,.....



The Code SG uses *will not* work for XL *2007*. 
This slightly modified version of it will work for XL2007
Add-In :  https://app.box.com/s/3mmv91ingtq6lvwq8kxgrl7lz7bal2t1 

Using Excel 2007
Row\Col
G
H

81
Name
Date

82
P_Tang
P-Tang

83
OLE
WigyWam

84
Biscuit Barrel
Wonk


*Molly*


_..............................................

The *code from Reginald’s Site*, http://excelmatters.com/excel-forums/
Add_In :  https://www.dropbox.com/s/31r9s6t9j6...ools.xlam?dl=0
_____... will *only work* in *XL2007**** if your Font colour is set to *automatic:* 
*Excel 2007*
Row\Col
G
H

*81*
Name
Date

*82*
P_Tang
P-Tang

*83*
OLE
WigyWam

*84*
Biscuit Barrel
Wonk


Sheet: *Molly*



****EDIT* a few hours later.... see next post. This Tool now does ( All ) Text and ( All ) Background color for XL 2007 +


_........................................................

But I think your code is adequate for you anyway. 
I just thought I would mention it in parsing for *anyone else* reading the Thread and using *XL 2007*

*Alan*

----------


## rorya

FYI, I believe that issue should now be fixed.

----------


## Doc.AElstein

> FYI, I believe that issue should now be fixed.



_..    Many thanks sir, for doing that change on what is IMHO the best all round Tool for Posting screen shots in a Forum Post. It's the Dog's Nutty Mutty Bollox I say, when I can
I confess i do not really have a clue how your Tool Fuctions,  and I have only done  the simplest Mods to Them.. But if i am not mistaken, it would appear the problem was a bit of constipation in Cell Passing, having had a .DisplayFormat and a .Font too many along the way, as it where. ( For some reason the XL 2010 + ( VBA7 ) was tolerant of this ?? )
	Could you please confirm that that was the only problem? I only ask as then if I just change the cell passer that I use then the problem will be solved for the many versions of your tool that i have passed on to people.

Thanks again for catching that one and taking such prompt action.
Appreciate it.
DE     Fred or any Jack Shit name! you like

Using Excel 2007
Name
Date

P_Tang
P-Tang

OLE
WigyWam

Biscuit Barrel
Wonk

*Thanks*
*Reg*

*A .Font and a .DisplayFormat*
*Too Much,  maybe?*


*Molly*

----------


## rorya

Yes that's all that needed changing.

----------


## Doc.AElstein

> Yes that's all that needed changing.



Thank you, sir . That was very helpful to me in clearing that up.
I was not too sure there as the Debug thing ( yellow highlight ) stopped at the Method or Property, and did not “ go in to “ the Class “ Thing “ to highlight in there where the ( “ Property “  ? ) therein “ made “ was.  If that makes sense ? – It don’t really to me, - I thought maybe such an error would come at the point that the Class thing was made. Or maybe not , if it is in the “  Get Thing “ that is only got when it is got. 
But then that begs the question why to make Class and not just do stuff when you want, or in a simple Function ....

But then again people who have at least some idea what they are talking about say the Class things in VBA are nor really any use other than just “ Prettying things up a bit”.

Thanks again. Great effort considering you are at the beginning of your Excel Forum career. Well done and good luck with your further learning.
DocAElstein (Banned)

----------


## FDibbins

So, what is the latest table-posting code here now?

We have bits and pieces all over, and updates galore - which 1 is the latest and greatest?

----------


## Doc.AElstein

> So, what is the latest ...... which 1 is the latest and greatest?



*Hi Ford.* 
 It is a bit of a jungle.!!
 Not too easy to answer as it depends what and where you are doing..  stuff...!
(  And maybe who your mates are )
_ -  You will probably get as many answers as people you ask !!!
I will try to cut it down to a few for you:-

 _1 ) If you are OK with an Add-In then Rory is close to your Dog's Bollox, :Roll Eyes (Sarcastic):  .. - colors, Fonts, background, formulas,  ( including having the latest HTML Code Generators...HTML Code is  not applicable here, but often the favourite elsewhere.... ) 
 Currently for *roryaing Stomper’s* : - Bottom page here:
http://excelmatters.com/excel-forums/
Add - in currently here:
https://www.dropbox.com/s/31r9s6t9j6...ools.xlam?dl=0

_.................................................

_2 ) * Jerry* did us a nice simple BB Code Generator for Excel Forum.. ( Font colours but No background colours. No Formulas )
http://www.excelforum.com/tips-and-t...um-thread.html

_....................................................... 

_3) And* Pike* cobbled together some  others and did a fairly all inclusive BB Code Generator. )( Font colours And  background colours ( and conditional formatting ) No Formulas )
http://www.ozgrid.com/forum/showthre...613#post763613


_......................................................

( _4) Finally* sourabhg98* did a simple alternative in this Thread ( the one we are in now)  )
_..............................................................................


 But i think at the end of the day you have to wade through the jungle of Posts on these Add-Ins and codes and pick the one you want. ( You have been in several Posts in most of the Threads discussing these Codes and Add-Ins. So have I ,.... and I was a bit overwhelmed myself  with the alternatives )... so 
I “collected” most codes here:
https://app.box.com/s/zhz7awdag4nl1zs6564s9zzcwp50e4w9
But the file is a bit of a mess. I can just about remember where and what all the codes are
Most codes there run as standalone codes, even if they originated as an Add-in. 

 _...
I do not think you will get a straight simple answer to this one. You will need to spend some time trying them out until you get one you are happy with. ...

Hope that is not too confusing – there is a lot of these codes kicking around these days as you noticed.!!
*Alan*

P.s. One last try to give you a simple answer: In that File of mine above:, I would probably narrow it down to this Code for  you ( as a good BB Code Generator.) ( All colors but no Formulas ***)

Sub BB_Table_Clipboard_PikeFoxAlan()

To use it highlight any range in that file, run that code ( which copies the Range as BB Code to the Clipboard ) and ...then...  like what i just did for you in that File, pasted into this Post from the Clipboard gives you:.....

Using Excel 2007
Row\Col
F
G

*13*
Hi
Ford


Sheet: *Molly*




And in case you have trouble downloading my File: here that code for you again ( Three parts as it does not fit in one Post!!)
http://www.excelfox.com/forum/f17/te...2079/#post9642
http://www.excelfox.com/forum/f17/te...2079/#post9643
http://www.excelfox.com/forum/f17/te...2079/#post9644

_....
*** P.P.s. If you want Formulas in a Code version  rather than an Add-In, then for example this Code version  from my File is a "stand a lone" code version of Rory's BB Code Generator Add-In  ( remember that does formulas also)  :
Sub ShowRangeToBBCFormJune()
Or, again as alternative to downloading my File, here the full code:
http://www.excelforum.com/showthread...t=#post4354867
Attatched therte are also a User Form and a Class Module you will also need to import


EDIT: Marcelo has just uploaded his latest ( Font and background  Colors ( No Formulas ) )
http://www.excelforum.com/showthread...81#post4354868

----------


## Doc.AElstein

> So, what is ........ latest and greatest?



*Hi Ford,*
Sorry I was not clear enough May be yesterday..., you see it is all a bit confusing with all the versions popping up from time to time. ( Maybe the code from Marcelo confused things a bit  he was , i think,  kindly responding to a particular request from Tony ** )
I try again to clarify for you

** Marcelo presented yesterday a stand alone Code to run to produce a BB Code. It does Coloured Fonts, and new to that particular stand alone code is that it does background color. He presented it I think especially for Tony Valko who yesterday was looking for background color in particular. It does not do formulas. 

Marcelo ( or shg ) also has an Add-in which he updated sometime ago to include the background colors  see post #10 from shg in this Thread ( the one we are in now ! ). The ADD-IN does Formulas also.
http://www.excelforum.com/the-water-...ml#post4324455

Note if you are using XL2007, like me, then that Add-In needs to be modified a bit as I did in this Add-In
https://app.box.com/s/3mmv91ingtq6lvwq8kxgrl7lz7bal2t1 
(_..... see my Post # 14 from this thread ( The one we are in now )
http://www.excelforum.com/the-water-...ml#post4325344
_.....)
_...............................................
But Important.




> ....
> confused is my middle name - so nothing new there lol
> OK with that new code from Marcelo (post 227), do I replace whatever I had for posting tables, with that code?



  I have no idea what code you are using. If you use Rorys ( aka Rorying Stomper etc. ) latest Add-In then you already have everything Marcelos code does and more. ( that is what i tried to explain yesterday in my post #20 here in the Thread we are in now ).
 If you are using a standalone code and not an Add-In, then yes you could replace the code you are using with that form Marcelo yesterday. Posts #227 
http://www.excelforum.com/showthread...65#post4354868
and also note post #232 #233 
( or better still try to read all again from the two threads active yesterday on this Theme ) )

I also tried to give you some alternatives yesterday.....

_.........................................................
Sorry it is all a bit confusing.   
*My bottom line is again* that Rorys Add-In ( or my standalone code version of it ) does most everything all the other things kicking about do. ( He incorporated background colours last June / July  i think )
(_....    http://www.excelforum.com/showthread...1090631&page=2 ...._   )

 If i understand correctly, Rory has cobbled together, added to , improved etc..   codes from the likes of  Marcelo Branco,   Tony Valko,  Jon von der Heyden, Peter (VoG), and  Stephen Gersuk (  and i apologise if i have missed anyone. )

*Alan*

----------


## rorya

> If i understand correctly, Rory has cobbled together, added to , improved etc..   codes from the likes of  Marcelo Branco,   Tony Valko,  Jon von der Heyden, Peter (VoG), and  Stephen Gersuk (  and i apologise if i have missed anyone. )



Basically yes.  :Smilie:

----------


## FDibbins

Thanks Alan.  I had a long day and my brain is a bit fried (we are putting in a new kitchen, and the variables and options are mind-boggling)
I will try and take another look at this tomorrow  :Smilie:

----------


## Doc.AElstein

Hi Ford.




> Thanks Alan.  I had a long day and my brain is a bit fried (we are putting in a new kitchen, and the variables and options are mind-boggling).....



My brain is also a bit fried .... 
_...    “_variables and options are mind-boggling_”   ... i can identify very well with that just now.
_  ... good luck with the RL stuff.  - I need to be off for a long while just now.  Hope some of the info i gave might be useful.

Alan

----------

