Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Formula in loop stops working

It worked. Now I dont need to work overtime (today) =)

Thanx

"Bernie Deitrick" wrote:

Jim,

Perhaps your cell was formatted for text. Try

Do While RowCount < 24
With Tbook.Worksheets("Data1").Cells(i, j)
.NumberFormat = "General"
.FormulaR1C1 = "=VLOOKUP(RC[-1],Library!R2C[-2]:R192C[1],3,FALSE)"
End with
RowCount = RowCount + 1
j = j + 1
Loop

HTH,
Bernie
MS Excel MVP

"Jim73" wrote in message
...
Hi,

I have a problem that I cant seem to find a solution to.

-----------

Do While rowcount < 24

Tbook.Worksheets("Data1").Cells(i, j) =
"=VLOOKUP(RC[-1],Library!R2C[-2]:R192C _ [1],3,FALSE)"
rowount = rowcount + 1
j = j + 1
Loop

-----------

In the first iteration/cell the formula:
=VLOOKUP(B21,Library!A$2:D$192,3,FALSE)
comes up in the cell. (This is the way I want it).

For my next iteration/cell following shows up:
=VLOOKUP(RC[-1],Library!R2C[-2]:R192C[1],3,FALSE)
i.e. it does not change the formula like it should. It fills the cell like
it was text.

Does anyone a solution to this?

Thanx in advance
Jim





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
IF just STOPS WORKING Gee Excel Worksheet Functions 21 August 6th 09 05:26 PM
Vlookup stops working??? Steve Peel Excel Worksheet Functions 0 September 19th 08 07:08 PM
Formula stops working after re-opening worksheet watchtower Excel Worksheet Functions 2 November 20th 06 09:11 PM
Autofilter Stops Working Vliegveld Excel Worksheet Functions 7 September 7th 05 01:19 AM
Hyperlink stops working Jami's Mom Excel Worksheet Functions 0 December 20th 04 05:17 PM


All times are GMT +1. The time now is 01:44 PM.

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

About Us

"It's about Microsoft Excel"