Hi,
I have wrote th below, but it only selects the last column, rather than all 5 i though it would - what am i missing?
thanks
Antony
![]()
Please Login or Register to view this content.
Hi,
I have wrote th below, but it only selects the last column, rather than all 5 i though it would - what am i missing?
thanks
Antony
![]()
Please Login or Register to view this content.
Last edited by shg; 12-12-2008 at 05:13 PM. Reason: code tags
Try:
In place of those first 5 lines of code. That presumes there are blank cells around the data you're copying.![]()
Please Login or Register to view this content.
Last edited by JBeaucaire; 12-12-2008 at 04:45 PM.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
The following will select N2 and the five columns to the right of N2 or N2:S2
![]()
Please Login or Register to view this content.
in order to avoid the wrath of a moderator please edit your first post to surround your code with code tags
Looks like my warning came a little too late
Last edited by mdbct; 12-12-2008 at 05:20 PM.
mdbct,
I have tried as you suggested, however it selects the whole column, where as i need it to only select from row below my heading , and to the same row downwards as the column next to n..... hence i was trying to use xlup/xldown.
Any other thoughts?
Thanks
Antony
this will select all the cells in columns N:S apart from row 1
providing that col n has no missing values![]()
Please Login or Register to view this content.
this will do the replace u wanted![]()
Please Login or Register to view this content.
ahh my bad this works
![]()
Please Login or Register to view this content.
Last edited by FRIEL; 12-15-2008 at 06:58 AM.
I dont like to use code i dont understand
it makes it hard to use in other situations
so please try to be as clear and patent as possible with me
Criticism is welcomed
friel,
i think im half way there - your code works if all the selected area is blank, the issue i have is that some lines will have data, im just trying to fill the blanks around these lines - any suggestions?
Many thanks for the help though
A
the way i under stand it is in cols N:S
there are cells with nothing in and cells with data in
is this correct??
if otherwise could you provide an example?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks