Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 273
Default Using if/then functions in Excel

I'm new to functions... How do I write the function "If cell D3 has any
character in it, then cell D4 = 1. If it has no characters, cell D4 = 0"

How about "If cell D3 has the word 'truck' in it, then cell D4 = 1"

Lastly, if I have a column of words such as car, truck, car, bus, bus, can
I somehow total the number of times "car" and "truck" appeared in the column?

Thanks,
Gary
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Using if/then functions in Excel


I'm new to functions... How do I write the function "If cell D3 has any
character in it, then cell D4 = 1. If it has no characters, cell D4 = 0"


Put this formula in D4
=IF(D3<"",1,0)



How about "If cell D3 has the word 'truck' in it, then cell D4 = 1"


Put this in D4
=if(D3="truck",1)


Lastly, if I have a column of words such as car, truck, car, bus, bus,

can
I somehow total the number of times "car" and "truck" appeared in the

column?


Look for COUNTIF in help. You should be able to do it..

- Murthy


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Using if/then functions in Excel


I'm new to functions... How do I write the function "If cell D3 has any
character in it, then cell D4 = 1. If it has no characters, cell D4 = 0"

Write in D4:
=IF(ISBLANK(D3),0,1)

How about "If cell D3 has the word 'truck' in it, then cell D4 = 1"

Write in D4:
=IF(D3="truck",1,"otherwise")


Lastly, if I have a column of words such as car, truck, car, bus, bus, can
I somehow total the number of times "car" and "truck" appeared in the column?


Write anywhe
=COUNTIF(D:D,"car")

Regards,
Stefi

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 273
Default Using if/then functions in Excel

Thanks!

"Murthy" wrote:


I'm new to functions... How do I write the function "If cell D3 has any
character in it, then cell D4 = 1. If it has no characters, cell D4 = 0"


Put this formula in D4
=IF(D3<"",1,0)



How about "If cell D3 has the word 'truck' in it, then cell D4 = 1"


Put this in D4
=if(D3="truck",1)


Lastly, if I have a column of words such as car, truck, car, bus, bus,

can
I somehow total the number of times "car" and "truck" appeared in the

column?


Look for COUNTIF in help. You should be able to do it..

- Murthy



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 273
Default Using if/then functions in Excel

Thanks!

"Stefi" wrote:


I'm new to functions... How do I write the function "If cell D3 has any
character in it, then cell D4 = 1. If it has no characters, cell D4 = 0"

Write in D4:
=IF(ISBLANK(D3),0,1)

How about "If cell D3 has the word 'truck' in it, then cell D4 = 1"

Write in D4:
=IF(D3="truck",1,"otherwise")


Lastly, if I have a column of words such as car, truck, car, bus, bus, can
I somehow total the number of times "car" and "truck" appeared in the column?


Write anywhe
=COUNTIF(D:D,"car")

Regards,
Stefi



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,646
Default Using if/then functions in Excel

You are welcome! Thanks for the feedback!
Stefi

€˛Gary€¯ ezt Ć*rta:

Thanks!

"Stefi" wrote:


I'm new to functions... How do I write the function "If cell D3 has any
character in it, then cell D4 = 1. If it has no characters, cell D4 = 0"

Write in D4:
=IF(ISBLANK(D3),0,1)

How about "If cell D3 has the word 'truck' in it, then cell D4 = 1"

Write in D4:
=IF(D3="truck",1,"otherwise")


Lastly, if I have a column of words such as car, truck, car, bus, bus, can
I somehow total the number of times "car" and "truck" appeared in the column?


Write anywhe
=COUNTIF(D:D,"car")

Regards,
Stefi

Reply
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
formula/functions for average and if functions Petu71 Excel Worksheet Functions 2 August 5th 07 08:25 PM
efficiency: database functions vs. math functions vs. array formula nickname Excel Discussion (Misc queries) 2 July 14th 06 04:26 AM
Looking for a site with functions that substitute the ATP functions Franz Verga Excel Worksheet Functions 3 June 24th 06 04:30 AM
User-defined functions created in Excel 2000 fail in Excel 2003 goodguy Excel Discussion (Misc queries) 1 October 3rd 05 07:04 PM
Nesting functions in the functions dialog box cs170a Excel Worksheet Functions 0 June 10th 05 10:36 PM


All times are GMT +1. The time now is 08:22 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"