PC Review


Reply
 
 
bforster1
Guest
Posts: n/a
 
      19th Sep 2004

Is there a way to have a cell format based on contents of an i
statement...

Example

if(C1="Input",and(C3,Format $#.##),if(C1="% of Revenue",and(C5,Forma
#.##%),na)

I want the If statement to test a condition, return contents of th
correct cell and format automatically.

Any help is appreciated

--
bforster
-----------------------------------------------------------------------
bforster1's Profile: http://www.excelforum.com/member.php...fo&userid=1177
View this thread: http://www.excelforum.com/showthread.php?threadid=26133

 
Reply With Quote
 
 
 
 
Dave Peterson
Guest
Posts: n/a
 
      19th Sep 2004
You can't change the format of the cell with a formula, but you could use a
formula like:

=IF(C1="input",TEXT(C3,"$#.##"),IF(C1="% of revenue",TEXT(C3,"#.##%"),C3))

You can also check some formats via:
=cell("format",C3)

See excel's help for the details.

bforster1 wrote:
>
> Is there a way to have a cell format based on contents of an if
> statement...
>
> Example
>
> if(C1="Input",and(C3,Format $#.##),if(C1="% of Revenue",and(C5,Format
> #.##%),na)
>
> I want the If statement to test a condition, return contents of the
> correct cell and format automatically.
>
> Any help is appreciated.
>
> --
> bforster1
> ------------------------------------------------------------------------
> bforster1's Profile: http://www.excelforum.com/member.php...o&userid=11771
> View this thread: http://www.excelforum.com/showthread...hreadid=261339


--

Dave Peterson
(E-Mail Removed)
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
cell format -> remove cell format pattern without effecting colors Bas Microsoft Excel Misc 1 23rd Mar 2009 02:54 PM
How do I copy data in single cell format to a merged cell format =?Utf-8?B?UGF1bA==?= Microsoft Excel Misc 1 27th Jun 2005 11:00 AM
DataGrid Cell: Custom Font/Backcolor/Format cell by cell (VB.NET) DraguVaso Microsoft ADO .NET 7 28th Jan 2004 09:04 PM
DataGrid Cell: Custom Font/Backcolor/Format cell by cell (VB.NET) DraguVaso Microsoft Dot NET Framework Forms 5 7th Jan 2004 09:09 PM
DataGrid Cell: Custom Font/Backcolor/Format cell by cell (VB.NET) DraguVaso Microsoft VB .NET 2 19th Dec 2003 10:03 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:11 PM.