VBA Macro Copy and Paste Loop Help [Closed]

Report
Posts
3
Registration date
Tuesday May 31, 2016
Status
Member
Last seen
June 1, 2016
-
 Blocked Profile -
I need to create a macro that allows me to copy and paste a set of formulas/values down a certain number of times. For example, if I had the following colors in cells B2:D3 and wanted to copy that specific block down to B5:D6, B8:D9 etc. all the way down to a specific row such as row 50, what VBA formula can I use?


B C D
2 red orange blue
3 yellow green purple

5
6

8
9

1 reply


Ok, what changes the colors, can possibly do the function. Don't check for a color, check for a value! Is this an EXCEL color by numbers? Wow what a great idea!

It's kind of fun to do the impossible! -Walter Elias Disney
Posts
3
Registration date
Tuesday May 31, 2016
Status
Member
Last seen
June 1, 2016

Hi,

Sorry I think I made this question confusing! I am not actually using colors, I am just using colors as a value. I actually resposted this question using names to hopefully make it a little bit easier to understand. I would eventually be using formulas in those cells, but I just want to be able to copy and paste those cells exactly as they are (format and formulas) down many times without having to manually do it. Hopefully that clarifies it a little - I appreciate your quick response!

Thanks,

Nicole
Blocked Profile
Hey Nicole!

Try the IF function. Syntax is as follows:
=IF(logic_test,true,false)

With that in mind:
=IF(A1="green","it is green", "it is not green")

Would this help?

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!