Hi all,
I need a Macro that does this...
If column C equals "Cherry", copy and paste it to column E
I'm sure this is an easy one for you guys. I am slowly getting the hang of this code stuff.
Thanks
Hi all,
I need a Macro that does this...
If column C equals "Cherry", copy and paste it to column E
I'm sure this is an easy one for you guys. I am slowly getting the hang of this code stuff.
Thanks
Last edited by duugg; 03-24-2009 at 05:34 PM.
Why not adapt the code you got in your last post
VBA Noob
_________________________________________
![]()
![]()
Credo Elvem ipsum etian vivere
_________________________________________
A message for cross posters
Please remember to wrap code.
Forum Rules
Please add to your signature if you found this link helpful. Excel links !!!
Hi Noob,
I thought about it but the code would be different I think. Let me explain why...
Grape Code says...
If grape is in column C, copy column D and paste into E.
Cherry Code says
If cherry is in column C, copy that same column (C) and paste into E.
I thought about it for a moment and did try to change to code, but it didn't work. Here's what I did...
What did I do wrong?![]()
Please Login or Register to view this content.
Thanks
You didn't tell it what you want the offset to be
e.g
Change
to![]()
Please Login or Register to view this content.
also you should only go down to the last cell instead of the whole Column to increase speed![]()
Please Login or Register to view this content.
e.g
VBA Noob![]()
Please Login or Register to view this content.
Noob,
As always, great code! After thinking about both codes (Cherry and Grape) for a moment, I realized that what I truly want is a bit of a variance to this.
If this should be a new thread, my apologies but I think it's relevant to this thread.
I think what I really want Excel to do is this...
1. IF a row in column E has data in it, leave that whole row alone.
1. IF a row in column E has NO data in it, find the first column in the same row that has data in a cell (right to left...ie first D, then C, then B) then copy and paste the contents of that cell into column E.
Thanks
Maybe
It assumes data always in Col D, B or C and you want to go to last cel in Col E instead of whole column![]()
Please Login or Register to view this content.
VBA Noob
Hmm,
It worked, but only until it found the first occurrence of data in column E, then the macro stopped. There are some rows that have data in column E, then some that don't, then do...etc.
Is there a way to keep this macro running and do a check down to the last row with data in it?
For example, column F will always have the bottom-most data in it (along with other columns but I'll use column F as the example).
Thanks
Try changing the letter
to![]()
Please Login or Register to view this content.
VBA Noob![]()
Please Login or Register to view this content.
Worked awesome!
Thanks!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks