+ Reply to Thread
Results 1 to 8 of 8

Macro to fill value in one of the three cells

  1. #1
    Registered User
    Join Date
    08-13-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    87

    Macro to fill value in one of the three cells

    Hello,
    I have data in a cell (Y2) that I would like to be copied in either one of three defined cells. If the first cell already has a value then it should go to the second one, if second is populated too then it should go to third. If third is filled up then it should display an error message.



    Thanks,
    Aadesh Gandhi

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Macro to fill value in one of the three cells

    This needs a simple macro

    How would you want to trigger the macro.

  3. #3
    Registered User
    Join Date
    08-13-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Macro to fill value in one of the three cells

    Quote Originally Posted by mehmetcik View Post
    This needs a simple macro

    How would you want to trigger the macro.
    This is a small bit of what I want to do with the sheet, I have the main macro setup. I was plannig to plug this into the main macro.

  4. #4
    Registered User
    Join Date
    08-13-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Macro to fill value in one of the three cells

    Quote Originally Posted by mehmetcik View Post
    This needs a simple macro

    How would you want to trigger the macro.
    These are the three cells what I want the values to be populated

    Please Login or Register  to view this content.
    Last edited by vlady; 03-13-2013 at 07:38 PM.

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Macro to fill value in one of the three cells

    You could use Something like this:-


    Please Login or Register  to view this content.
    Enjoy

  6. #6
    Registered User
    Join Date
    08-13-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Macro to fill value in one of the three cells

    Quote Originally Posted by mehmetcik View Post
    You could use Something like this:-


    Please Login or Register  to view this content.
    Enjoy
    Works great! Thanks!

  7. #7
    Registered User
    Join Date
    08-13-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Macro to fill value in one of the three cells

    Quote Originally Posted by mehmetcik View Post
    You could use Something like this:-


    Please Login or Register  to view this content.
    Enjoy
    Mehmetcik,
    Now I am trying to paste the value in a particular column, where number of rows is not defined. The logic is again same if first cell is filled up, go to next. In this case the starting cell is E25. How should I edit the code?


    Thanks,
    Aadesh Gandhi

  8. #8
    Registered User
    Join Date
    08-13-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    87

    Re: Macro to fill value in one of the three cells

    Quote Originally Posted by mehmetcik View Post
    You could use Something like this:-


    Please Login or Register  to view this content.
    Enjoy
    Mehmetick,
    I am using code but but the data is pasted in CF2, CF43 and so on. I want the data to be pasted starting at CF96 and then moving down one row at a time how can I edit this?

    Please Login or Register  to view this content.
    Thanks,
    Aadesh

+ 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