To whom it may concern,
I am trying to include a conditional format to indent a particular cell if another cell (month number) = 1, 6, 9 or 12.
Can anyone share some VB code that would help? Is this even possible?
Thanks very much.
To whom it may concern,
I am trying to include a conditional format to indent a particular cell if another cell (month number) = 1, 6, 9 or 12.
Can anyone share some VB code that would help? Is this even possible?
Thanks very much.
Can you elaborate upon what exactly you mean by indent a cell.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
Right text format perhaps?
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link
Thanks for replying.
I have a large report with a Table of Contents (TOC) on a particular worksheet.
I then have an IF statement that pulls in the categories into the TOC depending on what month it is. The month is a named range (single cell) on another worksheet. The named range = MonthNumber and equals 1-12. Month 1 pulls in different categories than Months 6, 9, 12 which is different than the other months.
There is a column of cells (d8:d29) on the TOC where, depending on the month, I would like to either:
a. increase indent 1 from the left one or more of these cells or
b. left justify one or more of these cells.
Ultimately, I was thinking about writing a formula using the conditional format like:
Default setting: all cells are left justified
1. IF month=x, increase indent by 1 or
Default setting: all cells start from the left and are indented 1,
2. IF month=x, left justify
Please let me know if you have any other questions. Thank you for your help.
Okay,
start by selecting all the cells in D8:D29
left-justify the cells
setup CF with a formula of =MONTH(D8)=MonthNumber
click Format
select the Number tab
select Custom type
use a format of _wdd-mmm (or _wdd/mm/yyy, or whatever date format you want)
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber