+ Reply to Thread
Results 1 to 7 of 7

Formula is working on Text but not on Numbers

Hybrid View

  1. #1
    Registered User
    Join Date
    10-08-2011
    Location
    Mellieha, Malta
    MS-Off Ver
    Excel 2003
    Posts
    4

    Formula is working on Text but not on Numbers

    Hi All,

    My workbook is working on 3 Sheets

    In Sheet named '1' I enter information

    In Sheet named 'Statement info' I gather information from Sheet '1' by using the following formula:
    IF($A$6<>'1'!C7,"",IF('1'!L7="P","",IF('1'!C7="","",IF('Statement Infoold'!$A$6='1'!C7,'1'!D7))))

    In Sheet named 'Statement' I collect info from Sheet 'Statement Info' and by using the following formaula in Column A:

    IF(OR('Statement Info'!A8="",'Statement Info'!A8),"",ROW())

    and this formula in Column B:

    IF(ROWS($7:7)>COUNT($A:$A),"",INDEX('Statement Infoold'!A:A,SMALL($A:$A,ROWS($7:7))))

    I ommit empty cells from Sheet 'Statement Info'

    My problem is that this formula is working when cells in sheet 'Statement Info' contain Text and fails when cells contain numbers.

    Can anyone help please.

    Thanks
    Albert

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699

    Re: Formula is working on Text but not on Numbers

    COUNT only counts numbers, so that last formula won't work as you want - change COUNT to COUNTA, that function counts any populated cell (numeric or text)
    Audere est facere

  3. #3
    Registered User
    Join Date
    10-08-2011
    Location
    Mellieha, Malta
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Formula is working on Text but not on Numbers

    [QUOTE=daddylonglegs;2615735]COUNT only counts numbers, so that last formula won't work as you want - change COUNT to COUNTA, that function counts any populated cell (numeric or text)[/Q

    Thank you ever so much for your kind reply, but unfortunately it still did not work as a result I got: #NUM!

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699

    Re: Formula is working on Text but not on Numbers

    OK, sorry, I was jumping to the wrong conclusion.....

    I think the problem is with this formula

    =IF(OR('Statement Info'!A8="",'Statement Info'!A8),"",ROW())

    what are you trying to do with that? The second part of the OR effectively excludes numbers, if you want all populated cells try changing that formula to this

    IF(('Statement Info'!A8<>"",ROW(),"")

  5. #5
    Registered User
    Join Date
    10-08-2011
    Location
    Mellieha, Malta
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Formula is working on Text but not on Numbers

    Thanks Again

    This formula ommits empty cells so my final report will skip empty cells and have cells that contain text or numbers stacked below each other.

    Unfortunately when I enter the formula you gave me I get a notification that there is something wrong with the formula
    Last edited by shg; 10-08-2011 at 05:53 PM. Reason: deleted quote

  6. #6
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,699

    Re: Formula is working on Text but not on Numbers

    mmmm...can't get anything right tonight

    This is what I meant

    =IF('Statement Info'!A8<>"",ROW(),"")

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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