View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Conditional formatting

Try this:

Highlight columns and enter CF:


=LEN(OFFSET(MyData,ROW()-1,COLUMN()-1))40

and think you need to retain the IF statement.

HTH

"Constantly Amazed" wrote:

Hi Toppers

Thanks for that. It works well. If in fact I need to check the first 4
columns is it possible to modify the formula by adding a column ref and
defining a name to an area rather than column.

Also can you use this method in my original IF statement to strip out the
first 40 characters if Sheet2!A1 contains more than 40?

Thanks

"Toppers" wrote:

Give the first description cell a name (INSERT=Name=DEFINE==Name: e.g.
MyData, Refers to: =Sheet2!$A$1 (if data starts in cell A1)

On your first shhet, highlight the desciption column and set the CF to:

FormulaIs; =LEN(offset(MyData,row()-1,0))40 and set colour.

Adjust ROW()-1 to suit

HTH

"Constantly Amazed" wrote:

Hi

The problem I am trying to address is that on my Sheet 1 I want to create a
template for uploading catalogue data. As such the fields have to be of
defined length or default entries. I am pasting the raw supplier data in
Sheet 2 and pulling it through into the template.

Descriptions are limited to 40 characters so I have set an IF formula to
strip out the first 40 if the raw data is longer or return the raw data if
less. However, I want to highlight that the description has been truncated
and therefore the user should check how meaningful it is and overtype if
necessary.

Where the text has been truncated, I tried to flag it with a conditional
format checking if the length of the entry on Sheet 2 is 40 but it says it
cannot do this. Because the template has to be in a set format I do not want
to introduce additional columns for flags on Sheet 1. Is there a way to get
around conditional formatting from another sheet or is it possible to
identify that my IF statement has produced a TRUE or FALSE status?

As always I appreciate any help offered.

G