+ Reply to Thread
Results 1 to 5 of 5

If empty command

  1. #1
    Registered User
    Join Date
    04-25-2017
    Location
    Sweden
    MS-Off Ver
    Microsoft Office 365 ProPlus Version 2002
    Posts
    33

    Talking If empty command

    Hello,

    Im trying to write an command for excel where i want it to return a 1 if the selected cell is empty and if its not empty i want it to return a value from another cell. I've tried to create a function, see below. It may make it easier to understand what I'm trying to do, even though its incorrect.

    =IF(ISBLANK(A2),1,CL13)

    I've also tried

    =IF(A2="",1,CL13), but i doesn't work.

    So bassically if A2 is blank i want it to return a "1" and if its not blank i want it to return the value in cell CL13.

    Can any1 help me fix this?

    I think the problem is that Excel doesn't understand that CL13 is a cell...

    Thank you!

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,718

    Re: If empty command

    Saying that " ... it doesn't work ... " is not very helpful. Do you get errors when trying to enter the formula? If so, you may need to use semicolons ( ; ) instead of the commas ( , ) in the formula, like this:

    =IF(ISBLANK(A2);1;CL13)

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    04-19-2017
    Location
    Manchester, England
    MS-Off Ver
    Excel 2013, Office 365, Windows 10
    Posts
    14

    Re: If empty command

    Both of these formulas return the values you seem to be expecting if the formula is placed in any cell.

    If you're placing the formula in cell A2, it will cause a circular reference. Might help to clarify where you're putting the formula.

  4. #4
    Registered User
    Join Date
    04-25-2017
    Location
    Sweden
    MS-Off Ver
    Microsoft Office 365 ProPlus Version 2002
    Posts
    33

    Re: If empty command

    This did the trick, thank you!

  5. #5
    Registered User
    Join Date
    04-19-2017
    Location
    Manchester, England
    MS-Off Ver
    Excel 2013, Office 365, Windows 10
    Posts
    14

    Re: If empty command

    Happy to help

    (also please mark it as solved in Thread Tools)

+ 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. Replies: 1
    Last Post: 02-12-2015, 01:48 PM
  2. Skip all empty cells (2 or more) using GET NEXT data command on a column
    By Newmord in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-10-2014, 02:40 PM
  3. Replies: 1
    Last Post: 05-07-2014, 07:05 AM
  4. Problem! rowcount command includes empty cells with colour/border
    By luke1908 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-30-2013, 06:04 PM
  5. Macro command button to hide empty rows
    By djauncey in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-31-2012, 10:42 AM
  6. Code for a master command button to change the backcolor of multiple command buttons?
    By panttherm5 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-16-2012, 10:11 PM
  7. Command for posting entry to the next empty cell
    By Confused Scripter in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-04-2005, 12: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