Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all, i tried to record a macro with excell that make more easy my
work, it just cut some colums and it orders some numbers, but i have a problem, the firsts colums to cut all in the same position for all appointments that i export but others are casual so the macro cannot work well because if a column is different then work is wrong. but, the starting column that i have to cut have always the same Letter the others no, in another words all colums have an intestation like: product id, price, year and so.. and it start always with "product id" but sometimes end with 3 columns ans sometime ends with 4 columns, but i'm thinking about this; the last column that i have to cut is always with intestation in Boldface, is possible ask vbs to cut from "product id" and last colum that are intested with boldface? here is the code but i stop at product id then i dont know how i can do the trick; Sub Macro1() ' ' Macro1 Macro ' Macro registrata il 08/04/2006 da Jhon ' ' Scelta rapida da tastiera: CTRL+d ' Rows("1:6").Select Selection.Delete Shift:=xlUp Cells.Select Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal Columns("G:H").Select Range("H1").Activate Selection.Delete Shift:=xlToLeft ActiveCell.FormulaR1C1 = "Data precedente" Columns("I:J").Select Range("J1").Activate Selection.Delete Shift:=xlToLeft ActiveWindow.LargeScroll ToRight:=2 Range("AC25:AC29").Select ActiveWindow.SmallScroll Down:=-7 ActiveWindow.LargeScroll ToRight:=-1 Columns("V:V").Select ***** AFTER HE TO LAST BOLDFACE INTESTED COLUMN. End Sub is possible something? sorry for my english. bye all. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
How do I boldface specific cells of data table connect to graph? | Excel Discussion (Misc queries) | |||
Find and boldface a single word everywhere in a worksheet | Excel Worksheet Functions | |||
how to count/sum by function/macro to get the number of record to do copy/paste in macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |