+ Reply to Thread
Results 1 to 5 of 5

IF function adding a text string after a number in the same argument.

  1. #1
    Forum Contributor
    Join Date
    03-30-2007
    Location
    London, UK
    MS-Off Ver
    Microsoft Office 2007
    Posts
    317

    Smile IF function adding a text string after a number in the same argument.

    Hi,

    I wanted to know if there is a way to do the following.

    Say you wanted to take bookings for a venue and you had say 15 spaces for that venue.

    I could use a simple method to count all the names such as the COUNTA() function.

    Say the COUNTA was in CELL A2 and in CELL A3 I had 15-A2 which is my maximum for any one booking.

    I know I could use the IF command to say IF (A3=0,"FULL",???")

    The problem is;is there a way if the value is not 0 to have say 'X' Spaces Left. X being the number of spaces left? Or would I need to just make another IF command is an adjacent cell?

    Thanks in advance for any help given.

    My last post got locked due to poor title, I hope this title is a lot more explanatory.

    Thanks.
    Best Regards.

    Michael
    -----------------------------------
    Windows Vista, Microsoft Office 2007

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Somethime like

    =IF(COUNTA(A5:A15)=0,"Full",COUNTA(A5:A15)&"/15")

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor
    Join Date
    03-30-2007
    Location
    London, UK
    MS-Off Ver
    Microsoft Office 2007
    Posts
    317
    Hi Thanks for the tip I shall give it a try when I get home.

    Thank you.

  4. #4
    Forum Contributor
    Join Date
    03-30-2007
    Location
    London, UK
    MS-Off Ver
    Microsoft Office 2007
    Posts
    317

    Thumbs up

    Yes this worked a treat, I replaced the "/15" with " Space/s Left" and it works great thanks.

  5. #5
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Glad it helped

    VBA Noob

+ 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