+ Reply to Thread
Results 1 to 5 of 5

Using a rule to replace value in particular cells

  1. #1
    Registered User
    Join Date
    09-24-2014
    Location
    Canada
    MS-Off Ver
    2011
    Posts
    2

    Using a rule to replace value in particular cells

    Hi!

    I'm not sure if it's even possible, but I give it a try here. Is there a way of using a "searching-rule" to change the content of specifics cells that meets the requirements of that rule?

    For example, I want to add the value of "1" in the cells of the column B, for which their row contains a "1" in the column A. So in this table, the cell B1, B2 and B5 would inherit the value of "1". Naturally, this is to be used on a much larger table.. Thanks!

    A B
    1 1
    2 1
    3 2
    4 3
    5 1
    6 2
    Last edited by machenier; 09-24-2014 at 11:57 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Using a rule to replace value in particular cells

    Hi, welcome to the forum

    If I understand you correctly...
    =if(A1=1,1,"")
    copied down
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Valued Forum Contributor wenqq3's Avatar
    Join Date
    04-01-2013
    Location
    Malaysia
    MS-Off Ver
    Excel 2003
    Posts
    868

    Re: Using a rule to replace value in particular cells

    If you want multiple value, can do like this
    =LOOKUP(A1,{1;2;3;4;5},{1;2;3;4;5})
    OR return string
    =LOOKUP(A1,{1;2;3;4;5},{"a";"b";"c";"d";"e"})
    -If the problem is solved, please mark your thread as Solved: Click Thread Tools above your first post, select "Mark your thread as Solved".

    -Always upload a workbook before start your question
    To attach a file, push the button with the paperclip (or scroll down to the Manage Attachments button), browse to the required file, and then push the Upload button.

    +++ If my answer(s) helped you, please add me reputation by click on * +++

  4. #4
    Registered User
    Join Date
    09-24-2014
    Location
    Canada
    MS-Off Ver
    2011
    Posts
    2

    Re: Using a rule to replace value in particular cells

    Thanks a lot FDibbins! Didn't thought it would've been that easy, still have a lot to learn with Excel haha Works like a charm!

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Using a rule to replace value in particular cells

    you'r welcome.

+ 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. Highlighting cells rule issue
    By xrajncajnx in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-07-2014, 12:38 PM
  2. Exception rule for highlighting cells macro
    By slavicgrip in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-07-2013, 01:33 AM
  3. Copy cells and Insert by rule
    By inasucur in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-29-2012, 04:54 AM
  4. Replies: 3
    Last Post: 08-04-2012, 07:22 PM
  5. apply rule to multiple cells
    By antonyx in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 04-23-2007, 10:38 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