+ Reply to Thread
Results 1 to 9 of 9

Formula will not copy correctly

  1. #1
    Registered User
    Join Date
    10-09-2015
    Location
    Illinois, USA
    MS-Off Ver
    2013
    Posts
    8

    Unhappy Formula will not copy correctly

    I have a very simple if formula that will not copy correctly. I would like the cell to display a "-" if another cell contains a value and stay blank if the same cell is blank. I've used this formula =IF(K2>-1,"-",IF(K2="","")) which worked just fine previously, but when I dragged it down through the column it would just show the "-" regardless of whether K2 had a value or not. Now even the original cell is showing "-" when the value in K2 is deleted. I have already made sure that the calculation method is set to "automatic". I'm sure it is something silly. Thanks in advance for the help.

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula will not copy correctly

    Does the cell still show the formula when you select it?

    =IF(K2="","","-")

  3. #3
    Registered User
    Join Date
    10-09-2015
    Location
    Illinois, USA
    MS-Off Ver
    2013
    Posts
    8

    Re: Formula will not copy correctly

    Yes it does

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: Formula will not copy correctly

    Is there a formula in K2?

    A cell that contains a formula, even if that formula evaluates to "", is not blank
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula will not copy correctly

    Actually, "-" for an empty cell would be correct, an empty cell has a numeric value of 0 and 0>-1 is true.

  6. #6
    Registered User
    Join Date
    10-09-2015
    Location
    Illinois, USA
    MS-Off Ver
    2013
    Posts
    8

    Re: Formula will not copy correctly

    No formula just a value. In this case it's a dollar amount. I want it to display a dash in a column between two dollar amounts, so it will show $150 - $200. $150 would be K2 the if formula L2 and $200 M2.

  7. #7
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: Formula will not copy correctly

    Can you upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.

  8. #8
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Formula will not copy correctly

    Quote Originally Posted by Bleveck90 View Post
    No formula just a value. In this case it's a dollar amount. I want it to display a dash in a column between two dollar amounts, so it will show $150 - $200. $150 would be K2 the if formula L2 and $200 M2.
    Try

    =IF(COUNT(K2,M2)=2,"-","")

    See my previous post for a reason why your formula didn't work properly.

  9. #9
    Registered User
    Join Date
    10-09-2015
    Location
    Illinois, USA
    MS-Off Ver
    2013
    Posts
    8

    Re: Formula will not copy correctly

    Quote Originally Posted by jason.b75 View Post
    Try

    =IF(COUNT(K2,M2)=2,"-","")

    See my previous post for a reason why your formula didn't work properly.
    Works perfectly. Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Formulas will not copy correctly
    By tbutler09 in forum Excel General
    Replies: 4
    Last Post: 07-23-2014, 01:31 PM
  2. Excel 2007 : Vlookup formula does not copy correctly
    By Rahul Orezzoli in forum Excel General
    Replies: 3
    Last Post: 11-17-2011, 01:39 AM
  3. formula wont copy correctly into next row
    By imatthews2001 in forum Excel General
    Replies: 6
    Last Post: 08-25-2011, 04:34 PM
  4. Formula does not copy correctly
    By rharclerode in forum Excel General
    Replies: 2
    Last Post: 10-22-2009, 10:47 AM
  5. formula wont copy across to other cells correctly
    By chrissywhittle in forum Excel General
    Replies: 10
    Last Post: 03-09-2006, 01:30 AM
  6. Correctly copy cells with a macro
    By Amy in forum Excel General
    Replies: 3
    Last Post: 06-30-2005, 03:05 PM
  7. [SOLVED] When I copy down into the next cell the formula changes correctly.
    By Jason30 in forum Excel General
    Replies: 1
    Last Post: 01-12-2005, 08:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1