LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 47
Default Enter Formula in a cell with VBA

Ok, I've found a new thing that I could do inside QPW
macros that I don't know how to do inside of Excel VBA.

I am open to accomplishing this however is necessary in
Excel. But I just wanted to describe what actually needs
to be taking place. In summary I am putting in a formula
while in Cell B1 (see below) that is based on data in Cell
D1, and copying that formula down to however many rows in
Column B are necessary to match up with what is in column
D. Then once I copy the formula far enough down in column
B, I need to paste the values that resulted from that
formula in those rows in column B. Then after that the
column D will no longer be necessary, and it will be
deleted.

My formula that I want to put in and then copy is as shown
below:


Range("B1").Select
=IF(LEN(D1)=3,+"20"&RIGHT(D1,2)&"0"&LEFT(D1,1),IF( LEN(D1)
=4,+"20"&RIGHT(D1,2)&LEFT(D1,2)))

Once I learn this technique here, then I should be off to
the races again for a while I hope.


Bruce
 
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
How to enter a formula in a cell? novastar Excel Worksheet Functions 2 September 1st 09 09:25 PM
Can you calculate a formula in the same cell where you enter the d Tikki Excel Discussion (Misc queries) 3 December 8th 06 08:12 PM
how to use a cell to enter a filename in a formula John Excel Worksheet Functions 2 March 11th 06 09:26 PM
Cannot enter formula in a cell after removing a circular formula Big Corona Excel Worksheet Functions 0 April 5th 05 06:07 PM
how to enter a null cell value in a formula Using formulas to enter NULL cell values Excel Worksheet Functions 5 December 16th 04 03:29 AM


All times are GMT +1. The time now is 06:40 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"