+ Reply to Thread
Results 1 to 6 of 6

Set value in a specific cell

  1. #1
    Registered User
    Join Date
    06-21-2018
    Location
    Halifax, Canada
    MS-Off Ver
    2010
    Posts
    4

    Set value in a specific cell

    Hi,
    I have two columns and would like to find the the value from the second column which does not exist in the first one and add it to the first empty cell in the column 1. for example, in the table below, I want to add ID 55555 from column ID 2 to the forth row in column ID 1. I know how to find the first empty cell in column 1, I just dont know how to tell excel to set A5 to value in B4

    ID 1 ID 2 First Empty Cell
    12243 12243 A$5$
    3254346 3254346
    546574 55555

    2022-08-05 21_55_35-data - Excel.png

  2. #2
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    1,895

    Re: Set value in a specific cell

    Are you wanting to do this with VBA?
    Or are you saying that you want a formula to put in cell A5 to get the first value in COL B that is not already in COL A?

  3. #3
    Registered User
    Join Date
    06-21-2018
    Location
    Halifax, Canada
    MS-Off Ver
    2010
    Posts
    4

    Re: Set value in a specific cell

    I am using Vlookup to find the missing ID from ID1 column (in this example 55555 which is the 3 record under ID 2).
    I also know how to find the next empty cell in ID 1 (where the value 55555 is supposed to go).
    I just dont know how (using VBA or formula) in excel to set the first empty cell in column 1 to the first missing record from column 2

    something like IF(ISERRROR(vlookup(B4,A:A,1,false)),Set(A4=B4))
    Last edited by loyola9988; 08-05-2022 at 10:06 PM.

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    1,895

    Re: Set value in a specific cell

    Are you still on V2010? If not, please update your profile.

    I don't think this will work in V2010, but maybe. You might need to enter it using Ctrl, Shift, Enter as an array formula.

    In A5, you could enter this formula:

    =INDEX(B2:B4,MATCH(0,COUNTIFS(A2:A4,B2:B4),0))

  5. #5
    Registered User
    Join Date
    06-21-2018
    Location
    Halifax, Canada
    MS-Off Ver
    2010
    Posts
    4

    Re: Set value in a specific cell

    Thank you very much.
    That worked

  6. #6
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    1,895

    Re: Set value in a specific cell

    You're welcome, and thanks for the rep.

+ 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. VBA to automatically change specific cell value to active cell in specific range
    By tantcu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-26-2016, 04:53 PM
  2. [SOLVED] Specific character of a cell to display as specific number on another cell
    By excellenct in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-13-2015, 11:45 AM
  3. [SOLVED] Copy specific cell value on sheet1 to specific cell on sheet2 or other sheet.
    By Mr.GfCs in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-20-2015, 02:41 PM
  4. Replies: 3
    Last Post: 07-12-2013, 09:17 AM
  5. Replies: 1
    Last Post: 06-22-2012, 02:18 PM
  6. Replies: 3
    Last Post: 01-21-2009, 05:37 AM

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