mihaipruna
New Member
- Joined
- Feb 3, 2009
- Messages
- 5
Basically I have been working under the assumption that people would not need to insert or remove columns in random places.
So my code has statements such as:
Cells(sumrow, 5).FormulaR1C1 = "=Takedown!R" & startrow & "C" & 45 - 4
If Cells(9, 7).Value = takedown.Cells(startrow, 4).Value Then
Range("I:I,J:J,M:M,N:N,O:O,P:P,Q:Q,R:R,S:S,T:T,U:U,V:V,W:W").Select
Is there a fairly easy way to change this code and make it work after users have inserted or removed columns,wherever their sweet hearts desire?
Or do I have to rewrite every line for querying column contents to figure out the location of each column? (which will also involve some editing of the spreadsheet itself since some columns cannot be distinguished from others)
Don't you love "reasonable" requests?
Is there a way columns can be added to the right of the columns affected by code, but displayed in between those columns? I could make an add-delete column button that would do that, rather than leave the user with control over adding or inserting columns.
Thanks much!
So my code has statements such as:
Cells(sumrow, 5).FormulaR1C1 = "=Takedown!R" & startrow & "C" & 45 - 4
If Cells(9, 7).Value = takedown.Cells(startrow, 4).Value Then
Range("I:I,J:J,M:M,N:N,O:O,P:P,Q:Q,R:R,S:S,T:T,U:U,V:V,W:W").Select
Is there a fairly easy way to change this code and make it work after users have inserted or removed columns,wherever their sweet hearts desire?
Or do I have to rewrite every line for querying column contents to figure out the location of each column? (which will also involve some editing of the spreadsheet itself since some columns cannot be distinguished from others)
Don't you love "reasonable" requests?
Is there a way columns can be added to the right of the columns affected by code, but displayed in between those columns? I could make an add-delete column button that would do that, rather than leave the user with control over adding or inserting columns.
Thanks much!