+ Reply to Thread
Results 1 to 6 of 6

Writing text in column F subject to the value found in column B

  1. #1
    Forum Contributor
    Join Date
    05-10-2011
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    145

    Writing text in column F subject to the value found in column B

    Please see excel file attached!
    As you can see, column B include numeral values between 1 to 100 and the "-" sign in some cells.

    I need a macro that will do the following:

    If value in column B is between 1 and 10 (including 1 and 10) then text string in column F will be Page 1
    If value in column B is between 11 and 20 (including 11 and 20) then text string in column F will be Page 2
    If value in column B is between 21 and 10 (including 21 and 30) then text string in column F will be Page 3
    If value in column B is between 31 and 10 (including 31 and 40) then text string in column F will be Page 4
    If value in column B is between 41 and 10 (including 41 and 50) then text string in column F will be Page 5
    If value in column B is between 51 and 10 (including 51 and 60) then text string in column F will be Page 6
    If value in column B is between 61 and 10 (including 61 and 70) then text string in column F will be Page 7
    If value in column B is between 71 and 10 (including 71 and 80) then text string in column F will be Page 8
    If value in column B is between 81 and 10 (including 81 and 90) then text string in column F will be Page 9
    If value in column B is between 91 and 100 (including 91 and 100) then text string in column F will be Page 10
    If value in column B is - then text string in column F will be -
    Attached Files Attached Files
    Last edited by sami770; 09-19-2017 at 03:06 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,604

    Re: Writing text in column F subject to the value found in column B

    column F:
    Please Login or Register  to view this content.
    Last edited by protonLeah; 09-19-2017 at 03:27 PM.
    Ben Van Johnson

  3. #3
    Forum Contributor
    Join Date
    05-10-2011
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    145

    Re: Writing text in column F subject to the value found in column B

    Thanks a lot, your formula does EXACTLY what I need.

    I use this a lot, instead of keeping this formula somewhere on my computer and copy paste it over and over again - i think that it will be a lot more handy if i could just have it ready in my macro list, can this be done as a macro?


    Quote Originally Posted by protonLeah View Post
    column F:
    Please Login or Register  to view this content.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,192

    Re: Writing text in column F subject to the value found in column B

    Here you go...
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  5. #5
    Forum Contributor
    Join Date
    05-10-2011
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    145

    Re: Writing text in column F subject to the value found in column B

    Perfect thanks a lot!!

    Quote Originally Posted by sintek View Post
    Here you go...
    Please Login or Register  to view this content.

  6. #6
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,192

    Re: Writing text in column F subject to the value found in column B

    Glad I could contribute...Thanks for rep +. If this solves your query, please mark thread as solved.

+ 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] Search for value in row. if found, copy column formulas into found column range
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-23-2017, 10:42 AM
  2. Replies: 1
    Last Post: 05-22-2017, 05:25 PM
  3. [SOLVED] Copy column based on text found in that column
    By Robert Woell in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-19-2017, 11:54 AM
  4. [SOLVED] Search multiple Text Criteria in one column, and if found, rename it in a different column
    By gbloemke in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-24-2014, 07:18 AM
  5. Replies: 3
    Last Post: 03-04-2014, 04:55 AM
  6. [SOLVED] search column for text, if found, paste value in a different column in new sheet
    By wkarnadi in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-17-2012, 10:29 AM
  7. Replies: 3
    Last Post: 06-17-2008, 08:57 PM

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