+ Reply to Thread
Results 1 to 4 of 4

How to insert an operator that adds a number between two strings

  1. #1
    Registered User
    Join Date
    06-08-2021
    Location
    Germany
    MS-Off Ver
    Excell 16.49
    Posts
    2

    How to insert an operator that adds a number between two strings

    Im terribly sorry if this question seems to be stupid, Im currently starting out with Excell (for automating my Anki).
    Although I tried to find a solution to my problem with research, due to lacks in my Excell vocabulary
    I wasn't able to find an answer.

    To the question:

    Here is my column

    HTML Code: 
    I want that to the number in each new row a 2 is added, Im guessing that I need to make it something like this:

    img src=“A" + functionality that adds 2 in new line + ".jpg”

    So im guessing that I need to make out of the one string 2 strings, one contains the A & the other one the .jpg, but how do I make the integer start at 1 and add a two to it in each new line?

    P.s. I don't think that you use + to add this functionality like I did above, did it like this because I know that you can add an int to a String in this way in other languages

  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,724

    Re: How to insert an operator that adds a number between two strings

    You can use this formula in your first cell:

    ="img src="&CHAR(34)&"A" & (ROWS($1:1)-1)*2+1 & ".jpg"&CHAR(34)

    then copy down as required. The part shown in red generates the numbers.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    06-08-2021
    Location
    Germany
    MS-Off Ver
    Excell 16.49
    Posts
    2

    Re: How to insert an operator that adds a number between two strings

    Worked perfectly, thank you very much

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

    Re: How to insert an operator that adds a number between two strings

    Glad to hear it.

    If that takes care of your original question, please take a moment to select Thread Tools from the menu above and to the right of your first post in this thread, and mark the thread as SOLVED.

    Also, since you are relatively new to the forum, you might like to know that you can directly thank those who have helped you by clicking on the small "star" icon located in the lower left corner of a post that you have found to be helpful (not just in this thread - for any post that has helped you). This also adds to the reputation of the poster (the small green bars in the poster's profile).

    Pete

+ 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. [SOLVED] how insert OR operator in formula
    By keshavtale in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-31-2017, 08:52 AM
  2. [SOLVED] VBA - Cut-Insert Columns Copy Worksheet changes DateTime format and adds am/pm
    By vaibhavtrivedi.vt in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-03-2015, 10:32 AM
  3. Replies: 2
    Last Post: 03-07-2013, 02:34 AM
  4. Replies: 5
    Last Post: 02-15-2012, 09:57 AM
  5. Is there an operator to look for any number in a range?
    By Bearded Dan in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-09-2008, 10:50 AM
  6. Insert hyphens in number or letter strings
    By excelhlp in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-16-2007, 07:11 PM
  7. How to find number of pairs of strings from list of strings?
    By greg_overholt in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 01-27-2006, 06:45 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