LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Using Conditional Formatting to write Text Value only if true

Thanks, Ivan.
If you have time to show me, I'd appreciate it.
At least I know that trying to input text values through conditional
formatting won't work. Thanks again, I really appreciate your taking the
time to let me know, Jim
--
Jim S


"Ivyleaf" wrote:

On Apr 6, 8:15 pm, Jim S wrote:
I have a calendar set up so that I enter one "start date" and it will
generate an 8-week schedule. I can then enter work times in for each day for
each employee.
What I want to do is use the following formula in a conditional format

=IF(AND(ABS(S14-$B$1)<55)*((S14-$B$1)-1), "H", "")

to fill in "H" (and then "O", "L", "I", "D", "A", "Y") but if the condition
is not true allow the user of the spreadsheet to fill in the hours the
employee will work that day.

In the above formula B1 is the start date. S14 is one of the Federal
Holidays.
The above tests if it is within the 8 week range. It correctly prints "H"
when I enter it in as a regular formula, but doesn't seem to print the "H"
when I enter it in as a conditional formula. I'm using Excel 2000 and am
stuck with that, because my workplace won't allow any upgrades.

To sum up, can I use conditional formatting in Excel 2000 to write a text
value in a cell? I don't want the user to have to enter the hours worked
into a conditional formatting statement, but have them enter in the hours and
have those overwritten by a conditional statment if that date falls on a
holiday.
--
Jim S


Hi Jim,

Short answer is 'No'. Conditional formatting can only change the
visual display elements of the cell, not the actual contents. The only
way to do what you are asking is via a macro that fires on the
Worksheet_Change event. I.e. write some code that tests what the user
enters (or deletes or doesn't enter) and then performs what you want.
I'm out of time tonight, but if someone hasn't given a sample by
tomorrow I'll see what I can do for you.

Cheers,
Ivan.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Write a formula for a penalty for status of TRUE? Esperanza Excel Worksheet Functions 4 February 14th 10 01:08 PM
Conditional Formatting Applied when Statement Not True Deanna Excel Discussion (Misc queries) 7 September 23rd 09 04:14 PM
Conditional Formatting for True/False Phil H.[_2_] Excel Programming 1 November 8th 05 09:14 PM
If B1 = 0 then D1= True - I need to write this in a macro No Name Excel Programming 3 September 17th 04 02:43 PM
comparing data and write values if true Jon-Henrik Excel Programming 2 November 28th 03 09:01 AM


All times are GMT +1. The time now is 07:35 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"