Hi
how do you duplicate the last column?
and why doesn't this code work?
p.s. I can't change this partPlease Login or Register to view this content.
because it's part of another code.Please Login or Register to view this content.
Hi
how do you duplicate the last column?
and why doesn't this code work?
p.s. I can't change this partPlease Login or Register to view this content.
because it's part of another code.Please Login or Register to view this content.
Please Login or Register to view this content.
Last edited by carlmon; 09-19-2022 at 03:50 PM.
Fast answers need visual help. Please read the yellow banner at the top of this page on how to attach a file.
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Hi (T_T),
what about
Please Login or Register to view this content.
A range expects to get information about the column letter and a row or a full column. VBA relies on certain rules that have to be followed. In your case both range and cells should not only be addressed by a column number.and why doesn't this code work?
HTH
Holger
Last edited by HaHoBe; 09-19-2022 at 05:17 PM. Reason: added With clause to code
Use Code-Tags for showing your code: [code] Your Code here [/code]
Please mark your question Solved if there has been offered a solution that works fine for you
Hi (T_T),
if you pass numeric values to the range it should be like
but this will work with the given row indicated.Please Login or Register to view this content.
You may use
if you want to work with a numeric value.Please Login or Register to view this content.
HTH,
Hoiger
For smart worksheet only :
PHP Code:
Sub Demo1()
With Tabelle1.UsedRange.Columns
.Item(.Count).Copy .Item(.Count + 1)
End With
End Sub
► Do you like it ? ► ► So thanks to click on bottom left star icon ? ★ Add Reputation ? ! ◄ ◄
Similar...Data starting in A1
Please Login or Register to view this content.
Good Luck
I don't presume to know what I am doing, however, just like you, I too started somewhere...
One-day, One-problem at a time!!!
If you feel I have helped, please click on the star to left of post [Add Reputation]
Also....add a comment if you like!!!!
And remember...Mark Thread as Solved.
Excel Forum Rocks!!!
(Hi T_T),
code will search all the cells on your sheet and return the column of the last cell with any sort of value stored in it (the asterisk is a wildcard meaning any content) - but code was part of your first post of this thread...
HTH,
Holger
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks