+ Reply to Thread
Results 1 to 6 of 6

I need your help write a macro

  1. #1
    Registered User
    Join Date
    08-09-2007
    Posts
    3

    I need your help write a macro

    Please refer the table below.
    A B
    -------------------
    1 test 1
    2 bb 0
    3 test 1
    4 dd 0
    5 test 1
    -------------------
    I need to write a macro which will copy values from Col B to Col A,if the value of the Col A is "test".

    Please let me know if you have any suggestion.

    Thanks,

    Abhik

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Welcome to excelforum

    Please read forum rules - see links below
    Please select suitable thread titles

    Try this macro

    Please Login or Register  to view this content.
    Last edited by mudraker; 08-09-2007 at 09:44 AM.
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    I need your help write a macro

    Try this

    Please Login or Register  to view this content.
    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  4. #4
    Registered User
    Join Date
    08-09-2007
    Posts
    3
    Quote Originally Posted by Ron Coderre
    Try this

    Please Login or Register  to view this content.
    Does that help?
    I can not execute the code. I am getting an error that.."Macros in this project are disabled". I have changed the security level of the macro to low. I am still getting the error.

    Please suggest.

  5. #5
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    I need your help write a macro

    Just a guess.......

    You changed the Macro Security to LOW after that workbook was already set to disable macros. Try closing it and re-opening it.

    NOTE: NEVER set Macro Security to LOW. That setting will run ALL macros without asking your permission. You should set it to MEDIUM. That way Excel will prompt you to allow macros in any workbook containing them.

    Does that help?

  6. #6
    Registered User
    Join Date
    08-09-2007
    Posts
    3
    Quote Originally Posted by Ron Coderre
    Just a guess.......

    You changed the Macro Security to LOW after that workbook was already set to disable macros. Try closing it and re-opening it.

    NOTE: NEVER set Macro Security to LOW. That setting will run ALL macros without asking your permission. You should set it to MEDIUM. That way Excel will prompt you to allow macros in any workbook containing them.

    Does that help?
    Thank you very much!

+ 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