Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default problem using excel function in vba

Hi

I have just been working on vba for the last 2 days only so please pardon my
lack of understanding of even the very basic terms

Basically, I have made an excel sheet where I have automated a process of
copying a specific range of rows from sheet 1 to different sheets using for
loop. everytime the loop finishes, it moves onto the next column to copy the
values again. This goes on when I press the start timer button

Ideally what I want to do is when I press the stop timer button, my code
should automatically move onto the next column and do a calculation
(variance) of all the previous column that was being copied before i pressed
the stop button.


Sub Insert_Formula()
Call IncrementCounter
For i = 3 To 53
If IsEmpty(Cells(i, GetCounter())) Then
Worksheets("USD").Cells(i, GetCounter()).Formula = "=VAR(B3:GetCounter-1)"
End If
Next i
End Sub

What I am doing is first incrementing my column and checking whether it is
empty.Counter is how I defined my columns as and I am very aware of the fact
that the way I have written the code above is not the way to do it. So could
you please tell me how to go about pursuing this?

Please tell me if you need more details to help me out. Thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with if function in excel panchal jignesh Excel Discussion (Misc queries) 4 March 1st 10 05:11 PM
excel function problem Bob Matthews[_2_] Excel Worksheet Functions 2 September 24th 08 07:20 PM
IF Function Problem Excel 2000 david@pcm Excel Worksheet Functions 4 September 28th 06 12:40 PM
Problem with Excel SUM function JoeD Excel Worksheet Functions 7 June 8th 05 04:19 PM
Excel VBA Problem- Using Find Function anandmr[_2_] Excel Programming 5 July 20th 04 10:12 PM


All times are GMT +1. The time now is 05:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"