Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need an excel sheet to automatically run a macro on click command, so
that this formula =Sheet3!A1&"" is inserted in all cells in the worksheet. Please advise on how i can go about doing this. Cheers! Sunny |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry. My subject says run on start up...I am okay with either a click
command or running on start up. All it needs to do is insert formula in the sheet |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
To fill ALL cells in a worksheet would mean nearly 17 million formulas
- I tried it and ran out of memory. For a lesser reange of cells, however, use this: (Ignore the text wrapping) Private Sub Workbook_NewSheet(ByVal Sh As Object) 'Change to whichever event is best ActiveSheet.Range("A1:C20").Formula = "=Sheet3!$A$1&" & Chr(34) & Chr(34) End Sub If you want the references to be relative, remove the $ signs. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Sunny,
Try assigning the following code to a button from the Forms toolbar: Public Sub Tester() ActiveSheet.UsedRange.Formula = "=Sheet3!A1&""""" End Sub --- Regards, Norman wrote in message ups.com... I need an excel sheet to automatically run a macro on click command, so that this formula =Sheet3!A1&"" is inserted in all cells in the worksheet. Please advise on how i can go about doing this. Cheers! Sunny |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am really curious as to why you would want to do this whether
it involves the entire worksheet (impossible), the used range, or even a large chunk of cells. --- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm wrote in message ups.com... I need an excel sheet to automatically run a macro on click command, so that this formula =Sheet3!A1&"" is inserted in all cells in the worksheet. Please advise on how i can go about doing this. Cheers! Sunny |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I tried doing it to the complete worksheet. Not possible -ran out of
memory. Then I did it for a range..works fine..Why I need it, is because I export from Access, multiple tables, which can only paste as new worksheets...I already have an existing worksheet with graphs which needs to pull data from there...so, I have linked the source for graphs to that existing worksheet, and written a macro to that existing sheet to copy from the new sheet that has been exported to excel... I don't think i am clear enough...let me know if you understood what i am trying...the number of records may sometimes exceed 50000, so i may need to do this manually by copying |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No I don't understand. What does having a sheetfull
of the same values get you that one cell with the value does not. Why do you even need the sheet. wrote in message I don't think i am clear enough...let me know if you understood what i am trying...the number of records may sometimes exceed 50000, so i may need to do this manually by copying |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am looking at automating a report, so i have cells that are
referenced to a sheet with a specific name "DUMP" . Access is unable to export data to that specific sheet, so it creates a new sheet called DUMP1 everytime..What i need to do is put a macro, which i can execute from access immediately after the export, so that the sheet DUMP gets populated with all the data on DUMP1 (sheet that just came in from access), so that the formula reference works fine. I cannot put formula reference to sheet DUMP1, because the DUMP1 doesnt exist, but only is created when exported. When the sheet doesnt exist, the formula changes to #REF error. I tried a macro and it works fine, except in cases of large chunks of data...Maybe i will try a macro which inserts the formula in the specific cells mentioned... Can you please help me, as to how a macro can be asked to paste a formula on different range of cells in a sheet, like from C1:C20 and C25:C40 and so on.. Cheers! |
#9
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
David,
Another question, how do i just copy the used range? Regards Sunny |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to automatically insert static time in a cell | Excel Worksheet Functions | |||
how do i automatically insert a file name into a formula from a ta | Excel Discussion (Misc queries) | |||
Automatically Insert Text Into Macro | Excel Programming | |||
Is there a way to insert a formula, password or macro in an excel spreadsheet that will automatically delete the spreadsheet? | Excel Discussion (Misc queries) | |||
Can I automatically start a macro if the contents of a particular cell change | Excel Programming |