Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I have an Excel column full of data imported from a text file. How do I apply an Excel function on each cell in that column and print the result in the next column using VBA? I don't want the user to see the function that I'm using. I know that I could type the function in the formula bar and apply AutoFill across the column, but this will make my function visible to the user. I'm trying to avoid scanning the whole column (cell by cell) using a FOR loop because it takes a long time. I feel there is an easier way to do it.. please let me know if you have an idea. Amjad |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am new to this, so investigate my advice before you follow it. However, I
know that you can turn off screen updating while your procedure is running and then turn it back on once it's done; I think this would solve your problem, I'm just not sure if there are any dangers to turning off screen updating. "Amjad" wrote in message ... Hi, I have an Excel column full of data imported from a text file. How do I apply an Excel function on each cell in that column and print the result in the next column using VBA? I don't want the user to see the function that I'm using. I know that I could type the function in the formula bar and apply AutoFill across the column, but this will make my function visible to the user. I'm trying to avoid scanning the whole column (cell by cell) using a FOR loop because it takes a long time. I feel there is an easier way to do it.. please let me know if you have an idea. Amjad |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Assume data is in column D and you want the results in column E
Dim rng as Range Application.ScreenUpdating = False set rng = Range(Cells(1,"D"),Cells(1,"D").End(xldown)) rng.offset(0,1).Formula = "=Round(" & rng(1).Address(0,0) & "/100,2)" rng.offset(0,1).Formula = rng.offset(0,1).Value Application.ScreenUpdating = True the formula is just a sample of how you would enter your formula. the last line replaces the formula with the values it produces. -- Regards, Tom Ogilvy "Amjad" wrote in message ... Hi, I have an Excel column full of data imported from a text file. How do I apply an Excel function on each cell in that column and print the result in the next column using VBA? I don't want the user to see the function that I'm using. I know that I could type the function in the formula bar and apply AutoFill across the column, but this will make my function visible to the user. I'm trying to avoid scanning the whole column (cell by cell) using a FOR loop because it takes a long time. I feel there is an easier way to do it.. please let me know if you have an idea. Amjad |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to apply a function to an entire column | Excel Worksheet Functions | |||
How do I apply my function to the entire column? | Excel Discussion (Misc queries) | |||
I want to apply a formula to an entire column. | Excel Discussion (Misc queries) | |||
How do I apply a function to an entire column? | New Users to Excel | |||
how to apply one function to an entire column of numbers | Excel Worksheet Functions |