Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have built a macro that is reading raw data and create a report from the
data,the report is great but the formula aren't shown in the end report. for example: if in my macro i have made a sum of different fields the result in the report is a number without the formula. there is a way to see the embedded formula after running the macro. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
without seeing your code my guess is you are populating the cells with the
values rather than the formuals eg.... MySum = application.worksheetfunction.sum("A1:A10") Range("a11") = MySum it should be range("a11") = "=Sum("""A1:A10""")" this will populate a formula into the cell and not just a value -- When you lose your mind, you free your life. Ever Notice how we use '' for comments in our posts even if they aren''t expected to go into the code? "SHIRA" wrote: I have built a macro that is reading raw data and create a report from the data,the report is great but the formula aren't shown in the end report. for example: if in my macro i have made a sum of different fields the result in the report is a number without the formula. there is a way to see the embedded formula after running the macro. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
sorry for the quotes the formula should be
range("a11") = "=Sum(A1:A10)" -- When you lose your mind, you free your life. Ever Notice how we use '' for comments in our posts even if they aren''t expected to go into the code? "ben" wrote: without seeing your code my guess is you are populating the cells with the values rather than the formuals eg.... MySum = application.worksheetfunction.sum("A1:A10") Range("a11") = MySum it should be range("a11") = "=Sum("""A1:A10""")" this will populate a formula into the cell and not just a value -- When you lose your mind, you free your life. Ever Notice how we use '' for comments in our posts even if they aren''t expected to go into the code? "SHIRA" wrote: I have built a macro that is reading raw data and create a report from the data,the report is great but the formula aren't shown in the end report. for example: if in my macro i have made a sum of different fields the result in the report is a number without the formula. there is a way to see the embedded formula after running the macro. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the reply
in fact this is what i am doing: inside a loop: clicks = clicks + Range("f" & CStr(i)) and after exiting the loop: Range("f" & CStr(row + 1)) = clicks "ben" wrote: sorry for the quotes the formula should be range("a11") = "=Sum(A1:A10)" -- When you lose your mind, you free your life. Ever Notice how we use '' for comments in our posts even if they aren''t expected to go into the code? "ben" wrote: without seeing your code my guess is you are populating the cells with the values rather than the formuals eg.... MySum = application.worksheetfunction.sum("A1:A10") Range("a11") = MySum it should be range("a11") = "=Sum("""A1:A10""")" this will populate a formula into the cell and not just a value -- When you lose your mind, you free your life. Ever Notice how we use '' for comments in our posts even if they aren''t expected to go into the code? "SHIRA" wrote: I have built a macro that is reading raw data and create a report from the data,the report is great but the formula aren't shown in the end report. for example: if in my macro i have made a sum of different fields the result in the report is a number without the formula. there is a way to see the embedded formula after running the macro. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hmmm
range("f" & row+1) = "=Sum(F" & LowestRow & ":f" & HighestRow & ")" use lowest/highest row to determine start and stop point and use above line outside of code -- When you lose your mind, you free your life. Ever Notice how we use '' for comments in our posts even if they aren''t expected to go into the code? "SHIRA" wrote: Thanks for the reply in fact this is what i am doing: inside a loop: clicks = clicks + Range("f" & CStr(i)) and after exiting the loop: Range("f" & CStr(row + 1)) = clicks "ben" wrote: sorry for the quotes the formula should be range("a11") = "=Sum(A1:A10)" -- When you lose your mind, you free your life. Ever Notice how we use '' for comments in our posts even if they aren''t expected to go into the code? "ben" wrote: without seeing your code my guess is you are populating the cells with the values rather than the formuals eg.... MySum = application.worksheetfunction.sum("A1:A10") Range("a11") = MySum it should be range("a11") = "=Sum("""A1:A10""")" this will populate a formula into the cell and not just a value -- When you lose your mind, you free your life. Ever Notice how we use '' for comments in our posts even if they aren''t expected to go into the code? "SHIRA" wrote: I have built a macro that is reading raw data and create a report from the data,the report is great but the formula aren't shown in the end report. for example: if in my macro i have made a sum of different fields the result in the report is a number without the formula. there is a way to see the embedded formula after running the macro. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thank you
"ben" wrote: hmmm range("f" & row+1) = "=Sum(F" & LowestRow & ":f" & HighestRow & ")" use lowest/highest row to determine start and stop point and use above line outside of code -- When you lose your mind, you free your life. Ever Notice how we use '' for comments in our posts even if they aren''t expected to go into the code? "SHIRA" wrote: Thanks for the reply in fact this is what i am doing: inside a loop: clicks = clicks + Range("f" & CStr(i)) and after exiting the loop: Range("f" & CStr(row + 1)) = clicks "ben" wrote: sorry for the quotes the formula should be range("a11") = "=Sum(A1:A10)" -- When you lose your mind, you free your life. Ever Notice how we use '' for comments in our posts even if they aren''t expected to go into the code? "ben" wrote: without seeing your code my guess is you are populating the cells with the values rather than the formuals eg.... MySum = application.worksheetfunction.sum("A1:A10") Range("a11") = MySum it should be range("a11") = "=Sum("""A1:A10""")" this will populate a formula into the cell and not just a value -- When you lose your mind, you free your life. Ever Notice how we use '' for comments in our posts even if they aren''t expected to go into the code? "SHIRA" wrote: I have built a macro that is reading raw data and create a report from the data,the report is great but the formula aren't shown in the end report. for example: if in my macro i have made a sum of different fields the result in the report is a number without the formula. there is a way to see the embedded formula after running the macro. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Event Macro running another macro inside | Excel Discussion (Misc queries) | |||
disable user running macro from Tools Macro | Excel Discussion (Misc queries) | |||
Running a macro from a conditional formula | Excel Discussion (Misc queries) | |||
Stop running a macro in the middle of a macro | Excel Programming | |||
Launch Macro in Access via Macro running in Excel??? | Excel Programming |