I have 7 columns that repeat accross the sheet. I need to format the Horizontal alignment for every 6th column. I know the following code does one colums
Please Login or Register to view this content.
I have 7 columns that repeat accross the sheet. I need to format the Horizontal alignment for every 6th column. I know the following code does one colums
Please Login or Register to view this content.
Last edited by teylyn; 12-22-2009 at 08:50 PM. Reason: added code tags
Your post does not comply with the Forum Rules regarding use of code tags. Please amend your thread to apply code tags. Possible solutions will be suggested after complying with the Forum Rules. Thanks.
3. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # button at the top of the post window. If you are editing an existing post, press Go Advanced to see the # button. For more information about these and other tags, click here.
Palmetto
Do you know . . . ?
You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.
Hi fetty, welcome to the forum.
I've added code tags for you this time, but I expect you to do it yourself from now on.
I have no idea what alignment 2 is, but one way is
... extending the range as necessary. If the range is too large, use a loop.Please Login or Register to view this content.
Your code would never work; object variables require a Set, not a Let.
Last edited by shg; 12-23-2009 at 01:50 AM.
Entia non sunt multiplicanda sine necessitate
This will not work. I need to format every 8th column. The problem is, I do not know how many I need. I am doing a loop now to add the data, but I add data like so...
Please Login or Register to view this content.
Do a loop using an integer variable, you can set a step size of 8. Loop up to the column number of the last column of the range.
Simple?
CC
Couldn't you just use range and offset to accomplish this?
Something like:
Haven't tried it but it seems like it may be in the direction you are trying to go.Please Login or Register to view this content.
Just tried this and it seems to be setting every 8th column to left align:
Please Login or Register to view this content.
This will work. I hope this help someone.....
Please Login or Register to view this content.
Gosh, what complex functions. Why are these necessary? I mean, doesn'treturn the value of a range at the specified row and column? I'm sure I must be missing something.Please Login or Register to view this content.
CC
I need to format the Horizontal alignment for every 6th column.You'd get a usable answer in a single response if you described your problem accurately and completely.I need to format every 8th column. The problem is, I do not know how many I need.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks