+ Reply to Thread
Results 1 to 5 of 5

Putting a number in the middle of a sentence without referencing a cell

  1. #1
    Registered User
    Join Date
    09-04-2018
    Location
    UK
    MS-Off Ver
    2013
    Posts
    24

    Putting a number in the middle of a sentence without referencing a cell

    See the example attached. I'm trying to make it so the IF formula in A10 will simply place the COUNTIF calculation (that's currently done in B10) in the middle of the sentence without having to reference B10, as surely there's no need to essentially do the same calculation twice. So the "&$B$10&" part of the formula in A10 should just be the formula in B10, but I can't work out how to do this correctly.

    Thanks.
    Attached Files Attached Files
    Last edited by DIAL90; 05-12-2019 at 10:35 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Putting a number in the middle of a sentence without referencing a cell

    Like this:

    =IF(COUNTIF($B$2:$B$9,"Red to Green")-COUNTIF($B$2:$B$9,"Green to Red")>=0,"Change: Red +"&(COUNTIF($B$2:$B$9,"Red to Green")-COUNTIF($B$2:$B$9,"Green to Red"))&" Places","Change: Red "&(COUNTIF($B$2:$B$9,"Red to Green")-COUNTIF($B$2:$B$9,"Green to Red"))&" Places")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    09-04-2018
    Location
    UK
    MS-Off Ver
    2013
    Posts
    24

    Re: Putting a number in the middle of a sentence without referencing a cell

    Hah, I knew it'd be something obvious I'd just missed getting right. Thanks a lot.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Putting a number in the middle of a sentence without referencing a cell

    No problem.

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  5. #5
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Putting a number in the middle of a sentence without referencing a cell

    Please try
    ="Change: Red "&TEXT(COUNTIF($B$2:$B$9,"Red to Green")-COUNTIF($B$2:$B$9,"Green to Red"),"+0;-0;0")&" Places"

+ 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. Insert value from cell in middle of a sentence
    By jw191 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-22-2019, 12:53 AM
  2. Cross reference letter case: Beginning of sentence and middle of sentence
    By caswell1000 in forum Word Formatting & General
    Replies: 4
    Last Post: 02-07-2019, 05:25 PM
  3. Replies: 6
    Last Post: 02-26-2015, 12:09 AM
  4. Replies: 1
    Last Post: 04-04-2014, 04:25 PM
  5. [SOLVED] Copying a word from one cell in a different worksheet into the middle of a sentence.
    By DannyJ in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-25-2012, 11:18 AM
  6. How do you insert a cell's content in the middle of the sentence?
    By simpleonline1234 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-29-2010, 02:56 PM
  7. Extract number in middle of cell
    By Jason Morin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 06:05 AM

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