This is what I have got so far....can't figure it out though:
Thanks for any help![]()
Please Login or Register to view this content.
This is what I have got so far....can't figure it out though:
Thanks for any help![]()
Please Login or Register to view this content.
Last edited by DonkeyOte; 07-15-2009 at 02:26 AM.
![]()
Please Login or Register to view this content.
This is what I have got so far....can't figure it out though:
Thanks for any help![]()
Please Login or Register to view this content.
I usually go with something like
I wouldn't do it exactly like that if it was mine, but you're using a macro recorder (which is a great way to learn), and I don't want to mess with your formula too much. Generally you stop using select and paste, and proceed to find a cell, then make the destination cell simply = the source cell without the copying and pasting.![]()
Please Login or Register to view this content.
mew!
Last edited by mewingkitty; 07-14-2009 at 09:38 PM.
=IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)
Apologies if I sound daft as I am a complete NOOB :D
Can I use the above code if my original selection is copied from a relative cell?
Also, Can you please show me where in my original code you would insert your code
Where is a good place to learn about the syntax (DIM, Integer ect ect) as I currently only understand how to select sheets, copy/paste data ect
Thx again
Yes, you can.
You'll notice if you copy/paste something, you can highlight everything you want and copy, then paste when you have only one cell selected. It always assumes you're pasting down and to the right if there's more than one cell.
As per where it goes, declarations always at the top, code before the insert, so:
![]()
Please Login or Register to view this content.
Now what I'd do would be more like:
To copy the first 20 columns of whatever row the activecell was on into the first blank row of the next page.![]()
Please Login or Register to view this content.
p.s.
No worries about sounding "daft". We all started sometime, and none of us had a clue what we were doing when we startedThere's always more to learn.
LEGEND..
Thanks for that....saved me hours...
One last question....How can I alter the above code to only search for empty cells below row 12?
Can you point me in a good direction to learn all the syntax so I understand what I am learning....Or is more the case of learn as we go?
Thanks again
I picked up a VBA book when I got started to be honest with you.
A lot of the general concepts are not well explained by many online. Once you get a basic drift of it though, it snowballs. Understanding one aspect of one thing is like turning on a light in a room... all kinds of things fall into place that seemed like they were random scattered pieces of information.
In the code that I've done up for you there, it
- declares x is an integer (dim x as integer), meaning it can only be whole numbers
- states that x = 1
- throws x into a loop which increases x by one each loop until it finds a blank cell
therefore to start on cell 13, simply change the - x = 1 - at the beginning to an - x = 13 - and it will start looking for empty cells on row 13 and down.
Personally, I found that the book gave me decent ground level understanding of things, but this site has helped me tons. As I've increased my basic understanding, I've seen the number of questions posted which I've been able to help answer grow dramatically.
Learning from a book will get you the ground rules, playing with what you know on a site such as this will allow you to challenge your level of knowledge, follow others who are solving questions you didn't know how to solve, and teach you new ways around problems by throwing variables in which were likely not covered in basic explanations.
And hey.
Can always ask
mew!
Edit:
If you are going to pursue this online, begin with a few key points such as:
- "Variables", definitions of them, and why they're needed
- "Option Explicit" this falls in with variables, makes sense once you get what it does
- "msgbox" I found that infinitely helpful. Popping up message boxes as you play with code so you see what's happening.
- "for"/"next" loops
- The great and powerful "IF/THEN" statement
- "do while" loops
- "do until" loops
after that you'll be looking at properties and events, that's when it gets ossim.
mew
Last edited by mewingkitty; 07-15-2009 at 12:21 AM.
Going forward please revise the offending post rather than posting a corrected version - I've amended your original and "undeleted" Palmetto's response.
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
cooper1308, do not create multiple threads - I have merged your two thread together.
Before posting on this board any further please take the time to read the Forum Rules.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks