Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Coding Problem

What I'm trying to do is, if no data is entered into a cell, then th
cell displays the "-" symbol. Below is the code I am working on t
make this happen but its not working. Can anybody help mw with this?

=IF(SUMIF(M16/G160),"-")

Thanks

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Excel Coding Problem

Hi
try
=IF(OR(M16="",G160=""),"-",M16/G160)

Note: this does NOT take care of the #DIV/0 error. For
this you may use
=IF(OR(M16="",G160="",G160=0),"-",M16/G160)

-----Original Message-----
What I'm trying to do is, if no data is entered into a

cell, then the
cell displays the "-" symbol. Below is the code I am

working on to
make this happen but its not working. Can anybody help

mw with this?

=IF(SUMIF(M16/G160),"-")

Thanks.


---
Message posted from http://www.ExcelForum.com/

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Excel Coding Problem

Which cell, M16 or G16? And why are you using SUMIF?

If G16 can be empty, you should code for it

=IF(G16="","", etc

Then if M16 can also be empty, something like

=IF(G16="","",IF(M16="","-",M16/G16))

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Fraggs " wrote in message
...
What I'm trying to do is, if no data is entered into a cell, then the
cell displays the "-" symbol. Below is the code I am working on to
make this happen but its not working. Can anybody help mw with this?

=IF(SUMIF(M16/G160),"-")

Thanks.


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel Coding Problem

That works great thanks but I forgot to mention I only want the "-
symbol to appear if no data is enterd in the corresponding cells. Whe
I entyer data into the said cells the "-" stays in the sum cell. Don
suppose you know how to fix this aswell do you?

Thanks again

--
Message posted from http://www.ExcelForum.com

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
Excel VBA coding problem adubbs99 Excel Discussion (Misc queries) 2 April 6th 09 06:28 PM
Help with my coding problem? Dan the Man[_2_] Excel Worksheet Functions 3 September 11th 07 12:02 AM
First attempt at VBA coding problem Rick in NS New Users to Excel 9 January 12th 06 05:11 PM
VBA Coding problem -text boxes Bourbon[_10_] Excel Programming 3 January 14th 04 10:36 PM
Coding problem: Runtime 1004 Phil Hageman Excel Programming 0 July 24th 03 05:29 PM


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

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"