Rabu, 27 Mei 2015

[ExcelVBA] Enter text in a cell, but retain original value



OK, let me try and explain this!

I have a spreadsheet that is used to record annual leave. Each TAB refers to a different person, and each sheet shows a calendar view for the annual leave year.

Each month entry shows the name of the month, and under that are the days Monday - Sunday. This is repeated for three months on the same section, then the next three months appear below it, then three months, then three months. So, it's laid out as follows:

M   T    W   T   F   S    S

                 1    2   3    4
5    6    7    8    9   10  11
12  13 14  15  16  17  18
19  20  21  22  23  24  25
26 27   28  29  30  31

There is the February & March to the right of this, with April, May & June below it, and so on.

There are three options for annual leave...Full day, half-day AM or half-day PM. 'F' is used for Full day, 'A' for half-day AM & 'P' for half-day PM. Using conditional formatting, I can get it colouring the cell as appropriate, based on the character entered. However, I want it to be a bit more 'advance'.

What I'm looking for is the person enters an 'F' against the 17 January above. The cell colours as appropriate, but the cell still contains the value 17 and not the 'F' that was entered.



Posted by: duncan.edment@gmail.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

Visit our ExcelVBA group home page for more info and support files:

More free tutorials and resources available at:




Tidak ada komentar:

Posting Komentar