+ Reply to Thread
Results 1 to 9 of 9

Simple Excel macro

Hybrid View

  1. #1
    Tom Ogilvy
    Guest

    Re: Simple Excel macro

    What I provided does what you ask.

    If you wanted to replace the 1's in column G with the corresponding value
    in column C, then that certainly isn't what you stated.

    --
    Regards,
    Tom Ogilvy


    "madbunny" <madbunny.24s7fy_1142544604.325@excelforum-nospam.com> wrote in
    message news:madbunny.24s7fy_1142544604.325@excelforum-nospam.com...
    >
    > Tom I appreciate the help but Justin was right, although that selects
    > only the individual fields in Column C, when I copy and paste it copys
    > the entire column.
    >
    > Justin that macro you posted does pretty much what I wanted, I can just
    > copy column H (which I changed to B) But I have another question. Can I
    > change:
    >
    > Do While Range("G" & x).Value <> ""
    > If Range("G" & x).Value = "1"
    >
    > to use the column I currently have selected instead of manually having
    > to change G to a different column? there's about 50 different columns I
    > have to run this macro for.
    >
    >
    > --
    > madbunny
    > ------------------------------------------------------------------------
    > madbunny's Profile:

    http://www.excelforum.com/member.php...o&userid=32541
    > View this thread: http://www.excelforum.com/showthread...hreadid=523253
    >




  2. #2
    Justin Philips
    Guest

    Re: Simple Excel macro

    Yes Tom's does work. Don't forget to add:

    Dim cell as Range

    You can decide which serves your purposes better.

    -Justin


  3. #3
    Tom Ogilvy
    Guest

    Re: Simple Excel macro

    Thanks for the note. To continue the helping:

    Dim x, y, c As Single

    x is variant
    y is variant
    c is single

    is that what you intended?

    Most would do

    Dim x as Long, y as Long, c as Long

    --
    Regards,
    Tom Ogilvy

    "Justin Philips" <philipsj@gmail.com> wrote in message
    news:1142603946.573476.259680@z34g2000cwc.googlegroups.com...
    > Yes Tom's does work. Don't forget to add:
    >
    > Dim cell as Range
    >
    > You can decide which serves your purposes better.
    >
    > -Justin
    >




  4. #4
    Justin Philips
    Guest

    Re: Simple Excel macro

    oh yeah...thanks!


+ 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