+ Reply to Thread
Results 1 to 4 of 4

If a cell contains a certain word change the data

  1. #1
    Registered User
    Join Date
    06-13-2018
    Location
    Newcastle, England
    MS-Off Ver
    2016
    Posts
    25

    If a cell contains a certain word change the data

    Hello,

    Please see attached example spreadsheet (this is not the official spreadsheet I am using just a basic version of what my main spreadsheet needs to achieve; I am trying to simplify the data for easy viewing)

    What I am trying to achieve is, in the Green cell (C3) I have a data validation list, when I select one of the options in the list, the monthly totals will appear from the table to the right for that option, then appear in the 'Monthly Totals' table (column C). This would need to match with each seperate option, I managed to get one option to work using IF function but could get each seperate to work in one table.

    Cheers
    Attached Files Attached Files
    Last edited by Deaco; 03-06-2019 at 08:10 AM.

  2. #2
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: If a cell contains a certain word change the data

    You can use the following formula in the col C for the months.

    this one goes in C4 for Apr
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    $F$3:$Q$8 is your values area of the table
    $C$3 is the chosen value from dropdown
    $E$3:$E$7 is the different items
    the 0 in the match formula tells the function to only give a result for an exact match to the value in C3
    ROW(A1) result in 1 as cell A1 is on row 1. but in place of the INDEX function it is used as value for the first column f tour values are so column F

    Every time you go down a row it changes to 2-3 upto 12 so that you show the next column (month) on the next row.

    so my solution is not bound to the names of the months to change the date.

    that would be possible too.. then you would need to replace the ROW(A1) with

    MATCH($B4;$F$2:$Q$2;0)

    then it will search for the column that matches the word in column B.
    but since months never tend to be in random order you can also use the ROW() trick.
    Attached Files Attached Files
    Last edited by Roel Jongman; 03-06-2019 at 08:06 AM.

  3. #3
    Forum Expert avk's Avatar
    Join Date
    07-12-2007
    Location
    India
    MS-Off Ver
    Microsoft Office 2013
    Posts
    3,223

    Re: If a cell contains a certain word change the data

    Also try in "C4"
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    copy paste down


    atul


    If my answer (or that of other members) has helped you, please say "Thanks" by clicking the Add Reputation button at the foot of one of their posts.

    Also: if your problem is solved, please take the time to mark your thread as SOLVED by going to the top of your first post, selecting "Thread Tools" and then "Mark thread as solved".

  4. #4
    Registered User
    Join Date
    06-13-2018
    Location
    Newcastle, England
    MS-Off Ver
    2016
    Posts
    25

    Re: If a cell contains a certain word change the data

    That works perfect thankyou

+ 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] Change number to word when pasted into a cell
    By Scoobster_doo in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-07-2017, 06:52 AM
  2. Macro to change colour of cell based on finding a specific word in the cell
    By Shelby761 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-24-2014, 09:46 AM
  3. Change lines of word data to tables
    By farrukh in forum Word Programming / VBA / Macros
    Replies: 2
    Last Post: 02-23-2012, 03:55 AM
  4. Change a cell with a word
    By donjjjordan in forum Excel General
    Replies: 8
    Last Post: 05-18-2011, 06:55 PM
  5. change the word acceding to data
    By johncena in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-11-2010, 05:11 AM
  6. [SOLVED] If a cell is a certain word I would like it to change colors.
    By Mike in forum Excel General
    Replies: 2
    Last Post: 01-25-2006, 04:00 PM
  7. find word in a cell then change cell format
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-23-2005, 09:06 AM

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