Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to insert formula iin column
HI,
I have the following set up ColK ColL ColM Col S Week 6 Week 7 Week 8 up to week 13 I'm summing all weeks Every week, I'm inserting a Vlookup. Is there a way I can do this with a macro? Since i'm summing all weeks, I can't copy the vlookup to next column. The vlookup will always be in Specific week column row2. I have to insert the vlookup in a few sheets, so trying to see if there is a faster way than doing this manually. Hope I'm making sense. ANy help wold be really appreciated. Thanks, Juan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to insert formula iin column
Hi Juan,
Could you post a copy of your vlookup formula for say week 7 and then again for week 8. It will be easier to work out what needs to be done when can see what changes are required. To copy the formula to the post. Select the cell with the formula. Highlight the formula in the formula bar. Ctrl/c to copy Press Enter (ensure you do this Ctrl/c ) Paste the formula into the post. Also what sheet name and range is the formula in for week 7 and then again for week 8. -- Regards, OssieMac "Juan" wrote: HI, I have the following set up ColK ColL ColM Col S Week 6 Week 7 Week 8 up to week 13 I'm summing all weeks Every week, I'm inserting a Vlookup. Is there a way I can do this with a macro? Since i'm summing all weeks, I can't copy the vlookup to next column. The vlookup will always be in Specific week column row2. I have to insert the vlookup in a few sheets, so trying to see if there is a faster way than doing this manually. Hope I'm making sense. ANy help wold be really appreciated. Thanks, Juan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to insert formula iin column
Hello Ossie,
thanks. here's the Vlookup and this will be in all weeks. =VLOOKUP($C:$C,[StatServer.xls]Final!$A:$D,3,0) When I'm done with that week, I just remove the Vlookup. So everyweek, I need to reenter the VLOOKUP. Looking for a faster/easier way. I have a few sheets that I have to enter similar Vlookup. Hope this makes sense. appreciate any help you can provide thanks, Juan "OssieMac" wrote: Hi Juan, Could you post a copy of your vlookup formula for say week 7 and then again for week 8. It will be easier to work out what needs to be done when can see what changes are required. To copy the formula to the post. Select the cell with the formula. Highlight the formula in the formula bar. Ctrl/c to copy Press Enter (ensure you do this Ctrl/c ) Paste the formula into the post. Also what sheet name and range is the formula in for week 7 and then again for week 8. -- Regards, OssieMac "Juan" wrote: HI, I have the following set up ColK ColL ColM Col S Week 6 Week 7 Week 8 up to week 13 I'm summing all weeks Every week, I'm inserting a Vlookup. Is there a way I can do this with a macro? Since i'm summing all weeks, I can't copy the vlookup to next column. The vlookup will always be in Specific week column row2. I have to insert the vlookup in a few sheets, so trying to see if there is a faster way than doing this manually. Hope I'm making sense. ANy help wold be really appreciated. Thanks, Juan |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to insert formula iin column
Hello Ossie,
here's what i came up with: Sub test() Dim firstrow As Long With ActiveSheet firstrow = 2 Range(Application.InputBox("enter column") & firstrow).Select Selection.Value = "=VLOOKUP($C:$C,[StatServer.xls]Final!$A:$D,3,0)" End With End Sub This seems to be ok. I can run the macro every week and will put the formula in the week I need. But appreciate if you have another idea. Is good to always have more than one way of doing things. Thanks, Juan "OssieMac" wrote: Hi Juan, Could you post a copy of your vlookup formula for say week 7 and then again for week 8. It will be easier to work out what needs to be done when can see what changes are required. To copy the formula to the post. Select the cell with the formula. Highlight the formula in the formula bar. Ctrl/c to copy Press Enter (ensure you do this Ctrl/c ) Paste the formula into the post. Also what sheet name and range is the formula in for week 7 and then again for week 8. -- Regards, OssieMac "Juan" wrote: HI, I have the following set up ColK ColL ColM Col S Week 6 Week 7 Week 8 up to week 13 I'm summing all weeks Every week, I'm inserting a Vlookup. Is there a way I can do this with a macro? Since i'm summing all weeks, I can't copy the vlookup to next column. The vlookup will always be in Specific week column row2. I have to insert the vlookup in a few sheets, so trying to see if there is a faster way than doing this manually. Hope I'm making sense. ANy help wold be really appreciated. Thanks, Juan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro- Column Insert | Excel Discussion (Misc queries) | |||
Macro- Column Insert | Excel Discussion (Misc queries) | |||
Recorded single column insert in macro. Macro inserts two not one | Excel Programming | |||
Macro - Insert&Label Column, if the labeled column doesn't exist | Excel Programming | |||
Need Macro to Find Column Heading -- if none, then insert new column | Excel Programming |