+ Reply to Thread
Results 1 to 4 of 4

Copying a value into a cell

  1. #1
    Forum Contributor
    Join Date
    03-18-2009
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2003
    Posts
    104

    Copying a value into a cell

    What I'd like to do is to input the value "Agent" into the yellow cell if there is not the word "Agent" already there. The position of the "Agent" cell will vary but is always located directly above the block of names below it.
    Attached Files Attached Files
    Last edited by eonizuka; 04-30-2009 at 12:17 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Copying a value into a cell

    You just want a macro to start at cell A1, search down through a series of empty cells until it finds the block of names and then enter "AGENT" in the cell above? This line of code will do that:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert
    Join Date
    10-10-2008
    Location
    Northeast Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2,387

    Re: Copying a value into a cell

    eonizuka,

    See the attached workbook "Copy a value into a cell with the Interior Color Index of 6 Yellow - eonizuka - SDG.xls" with macro "FindSetAgent".

    To run the macro, press and hold down the "CTRL" + "SHIFT" + "A" keys.
    Last edited by stanleydgromjr; 04-29-2009 at 09:08 PM.
    Have a great day,
    Stan

    Windows 10, Excel 2007, on a PC.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved by clicking EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  4. #4
    Forum Contributor
    Join Date
    03-18-2009
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2003
    Posts
    104

    Re: Copying a value into a cell

    Thank you both for your help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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