+ Reply to Thread
Results 1 to 3 of 3

If C contains specific STRING Switch Column A value with Column B Else Do nothing

  1. #1
    Registered User
    Join Date
    03-09-2016
    Location
    Detroit
    MS-Off Ver
    365
    Posts
    8

    If C contains specific STRING Switch Column A value with Column B Else Do nothing

    Example in attached

    If C contains specific STRING Switch Column A value with Column B Else Do nothing

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,279

    Re: If C contains specific STRING Switch Column A value with Column B Else Do nothing

    You cannot switch (by formula) unless cells in A and B are themelves assigned from other cells: so VBA is the only option

    e.g

    A2=H2 without Switch
    B2=K2 without Switch

    in A2

    =IF(C2="Switch", K2,H2)

    in B2

    If)C"="Switch",H2,K2)

  3. #3
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2404
    Posts
    13,406

    Re: If C contains specific STRING Switch Column A value with Column B Else Do nothing

    Edited

    I agree with John Topley about need for VBA. If A and B are assigned different cells this formula also works. In A8 then fill down and across to B11 this also works.
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    A
    B
    C
    1
    A-Apples
    B-Bells
    C-Comments
    2
    Granny Smith
    Church
    3
    Alarm
    Gala
    Switch
    4
    Fuji
    Bicycle
    5
    Class
    Braeburn
    Switch
    6
    7
    8
    Granny Smith
    Church
    9
    Gala
    Alarm
    10
    Fuji
    Bicycle
    11
    Braeburn
    Class
    Dave

+ 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] VBA Macro to find text string in one column and replace specific text in another column if
    By bmahfood in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-21-2017, 11:15 AM
  2. [SOLVED] Replacing specific text in string from same column...
    By netsecrets00 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-05-2014, 02:56 AM
  3. [SOLVED] Vba code to concatenate a specific string to more than one column
    By mvneema in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 03-27-2014, 01:18 PM
  4. [SOLVED] create a string of results from column A that have specific value in column b
    By blackspiral in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-23-2013, 03:42 AM
  5. Replies: 1
    Last Post: 04-23-2012, 10:27 AM
  6. Date stamp if specific string in column A
    By Xx7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-03-2012, 11:35 PM
  7. Sorting Specific Character String in Column
    By ian.cathey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-16-2010, 05:08 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