PC Review


Reply
Thread Tools Rate Thread

Conditional formula if content is text

 
 
a m spock
Guest
Posts: n/a
 
      21st Dec 2008
How do i write an IF statement which does Task A if contents of a certain
cell are a TEXT and Task B if it is a numerical value. e.g. If(A1=any
text,1,0) or If(a1=specific text,1,0)
 
Reply With Quote
 
 
 
 
JLGWhiz
Guest
Posts: n/a
 
      21st Dec 2008
If IsNumeric(ActiveCell) Then
'Do Task "B"
Else
'Do Task "A"
End If

"a m spock" wrote:

> How do i write an IF statement which does Task A if contents of a certain
> cell are a TEXT and Task B if it is a numerical value. e.g. If(A1=any
> text,1,0) or If(a1=specific text,1,0)

 
Reply With Quote
 
Gord Dibben
Guest
Posts: n/a
 
      21st Dec 2008
Before using isnumeric see this thread.

You could be surprised.

http://tinyurl.com/9to4ka


Gord Dibben MS Excel MVP


On Sat, 20 Dec 2008 17:13:00 -0800, JLGWhiz
<(E-Mail Removed)> wrote:

>If IsNumeric(ActiveCell) Then
> 'Do Task "B"
>Else
> 'Do Task "A"
>End If
>
>"a m spock" wrote:
>
>> How do i write an IF statement which does Task A if contents of a certain
>> cell are a TEXT and Task B if it is a numerical value. e.g. If(A1=any
>> text,1,0) or If(a1=specific text,1,0)


 
Reply With Quote
 
FSt1
Guest
Posts: n/a
 
      21st Dec 2008
hi
you might try...
formula is......=if(istext(a1),1,0)

regards
FSt1

"a m spock" wrote:

> How do i write an IF statement which does Task A if contents of a certain
> cell are a TEXT and Task B if it is a numerical value. e.g. If(A1=any
> text,1,0) or If(a1=specific text,1,0)

 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      21st Dec 2008
Sort of opens a whole new world, doesn't it? Microsoft needs to come up with
an easier way to return data types from a worksheet cell. I am sure that I
am not the only one who struggles with this occasionally.

"Gord Dibben" wrote:

> Before using isnumeric see this thread.
>
> You could be surprised.
>
> http://tinyurl.com/9to4ka
>
>
> Gord Dibben MS Excel MVP
>
>
> On Sat, 20 Dec 2008 17:13:00 -0800, JLGWhiz
> <(E-Mail Removed)> wrote:
>
> >If IsNumeric(ActiveCell) Then
> > 'Do Task "B"
> >Else
> > 'Do Task "A"
> >End If
> >
> >"a m spock" wrote:
> >
> >> How do i write an IF statement which does Task A if contents of a certain
> >> cell are a TEXT and Task B if it is a numerical value. e.g. If(A1=any
> >> text,1,0) or If(a1=specific text,1,0)

>
>

 
Reply With Quote
 
a m spock
Guest
Posts: n/a
 
      21st Dec 2008
many thanks. this is the simplest. can you suggest what to do for part 2 of
my question. if for example i have to match to a specific text say,
If(A1=Car,1,0)?

"FSt1" wrote:

> hi
> you might try...
> formula is......=if(istext(a1),1,0)
>
> regards
> FSt1
>
> "a m spock" wrote:
>
> > How do i write an IF statement which does Task A if contents of a certain
> > cell are a TEXT and Task B if it is a numerical value. e.g. If(A1=any
> > text,1,0) or If(a1=specific text,1,0)

 
Reply With Quote
 
FSt1
Guest
Posts: n/a
 
      21st Dec 2008
hi
i think you already have it. just add quotes to car.

formula is....=if(A1="Car",1,0)......pick your format.

Regards
FSt1

"a m spock" wrote:

> many thanks. this is the simplest. can you suggest what to do for part 2 of
> my question. if for example i have to match to a specific text say,
> If(A1=Car,1,0)?
>
> "FSt1" wrote:
>
> > hi
> > you might try...
> > formula is......=if(istext(a1),1,0)
> >
> > regards
> > FSt1
> >
> > "a m spock" wrote:
> >
> > > How do i write an IF statement which does Task A if contents of a certain
> > > cell are a TEXT and Task B if it is a numerical value. e.g. If(A1=any
> > > text,1,0) or If(a1=specific text,1,0)

 
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
Conditional formatting formula that uses VLookup, based on content of another cell Fred Microsoft Excel Misc 2 3rd Aug 2006 10:38 AM
Conditional formatting formula that uses VLookup, based on content of another cell Fred Microsoft Excel Misc 3 2nd Aug 2006 04:23 PM
Conditional Formatting if cell content is a formula =?Utf-8?B?b2xkc2FtYnZjYQ==?= Microsoft Excel Worksheet Functions 2 6th Jun 2006 10:24 PM
formula to extract partial content (text) of cell =?Utf-8?B?bWlsYW5v?= Microsoft Excel Misc 3 9th Nov 2005 04:57 PM
Transferring Text Box Content to cell - Formula Help Shashi Bhosale Microsoft Excel Programming 2 23rd Nov 2004 01:11 PM


Features
 

Advertising
 

Newsgroups
 


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