Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 118
Default HELP! Lost data - need to insert formula but get error!

I'm iterating down a column of cells on Sheet1. If the cell is blank, I
want to insert the following formula:
ActiveCell.Formula = "=IF(ISERROR(MATCH($C" & j &
"TIRs!$C$2:$C$15000,0)),0,INDEX(TIRs!" & i & "$2:" & i & "$15000,MATCH($C" &
j & "TIRs!$C$2:$C$15000,0)))"
where i and j are the column and row indexes (Dimmed as Long) for the
ActiveCell. The variables do have the values. But I get the following:
Application-defined or object-defined error.

What I'm trying to do is pick up some data I lost from a previous version of
this workbook. If the cell is blank, there may be a value that is supposed
to be there on the previous version; look at Column C for that same row and,
if that value matches the value in Col C on Sheet(TIRs), pull the value onto
Sheet1.

I use the formula in my weekly updates and it works there - *BUT* I use it
without variables - it's inserted in row2 of the column and run down. I
can't do that here because the older version of the data that has the lost
data does not have new data I've inserted before I discovered the problem.
So I'm trying to insert this modified formula into only blank cells so it
picks up the ActiveCell row and column.

Any help is appreciated.
Ed


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default HELP! Lost data - need to insert formula but get error!

Hi Ed
maybe you have missed some comas. Try
"=IF(ISERROR(MATCH($C" & j &",TIRs!$C$2:$C$15000,0)),0,INDEX(TIRs!" & i
& "$2:" & i & "$15000,MATCH($C" &
j & ",TIRs!$C$2:$C$15000,0)))"

--
Regards
Frank Kabel
Frankfurt, Germany


Ed wrote:
I'm iterating down a column of cells on Sheet1. If the cell is
blank, I want to insert the following formula:
ActiveCell.Formula = "=IF(ISERROR(MATCH($C" & j &
"TIRs!$C$2:$C$15000,0)),0,INDEX(TIRs!" & i & "$2:" & i &
"$15000,MATCH($C" & j & "TIRs!$C$2:$C$15000,0)))"
where i and j are the column and row indexes (Dimmed as Long) for the
ActiveCell. The variables do have the values. But I get the
following: Application-defined or object-defined error.

What I'm trying to do is pick up some data I lost from a previous
version of this workbook. If the cell is blank, there may be a value
that is supposed to be there on the previous version; look at Column
C for that same row and, if that value matches the value in Col C on
Sheet(TIRs), pull the value onto Sheet1.

I use the formula in my weekly updates and it works there - *BUT* I
use it without variables - it's inserted in row2 of the column and
run down. I can't do that here because the older version of the data
that has the lost data does not have new data I've inserted before I
discovered the problem. So I'm trying to insert this modified formula
into only blank cells so it picks up the ActiveCell row and column.

Any help is appreciated.
Ed


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 118
Default HELP! Lost data - need to insert formula but get error!

Thanks, Frank. I did miss those. But it didn't help. I still get the
error. Is there maybe a better way to deal with the variables?

Ed

"Frank Kabel" wrote in message
...
Hi Ed
maybe you have missed some comas. Try
"=IF(ISERROR(MATCH($C" & j &",TIRs!$C$2:$C$15000,0)),0,INDEX(TIRs!" & i
& "$2:" & i & "$15000,MATCH($C" &
j & ",TIRs!$C$2:$C$15000,0)))"

--
Regards
Frank Kabel
Frankfurt, Germany


Ed wrote:
I'm iterating down a column of cells on Sheet1. If the cell is
blank, I want to insert the following formula:
ActiveCell.Formula = "=IF(ISERROR(MATCH($C" & j &
"TIRs!$C$2:$C$15000,0)),0,INDEX(TIRs!" & i & "$2:" & i &
"$15000,MATCH($C" & j & "TIRs!$C$2:$C$15000,0)))"
where i and j are the column and row indexes (Dimmed as Long) for the
ActiveCell. The variables do have the values. But I get the
following: Application-defined or object-defined error.

What I'm trying to do is pick up some data I lost from a previous
version of this workbook. If the cell is blank, there may be a value
that is supposed to be there on the previous version; look at Column
C for that same row and, if that value matches the value in Col C on
Sheet(TIRs), pull the value onto Sheet1.

I use the formula in my weekly updates and it works there - *BUT* I
use it without variables - it's inserted in row2 of the column and
run down. I can't do that here because the older version of the data
that has the lost data does not have new data I've inserted before I
discovered the problem. So I'm trying to insert this modified formula
into only blank cells so it picks up the ActiveCell row and column.

Any help is appreciated.
Ed




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default HELP! Lost data - need to insert formula but get error!

Hi
after inserting these two comas the formula is inserted for me
(replacing your variables with some dummy values)

--
Regards
Frank Kabel
Frankfurt, Germany


Ed wrote:
Thanks, Frank. I did miss those. But it didn't help. I still get
the error. Is there maybe a better way to deal with the variables?

Ed

"Frank Kabel" wrote in message
...
Hi Ed
maybe you have missed some comas. Try
"=IF(ISERROR(MATCH($C" & j &",TIRs!$C$2:$C$15000,0)),0,INDEX(TIRs!"
& i & "$2:" & i & "$15000,MATCH($C" &
j & ",TIRs!$C$2:$C$15000,0)))"

--
Regards
Frank Kabel
Frankfurt, Germany


Ed wrote:
I'm iterating down a column of cells on Sheet1. If the cell is
blank, I want to insert the following formula:
ActiveCell.Formula = "=IF(ISERROR(MATCH($C" & j &
"TIRs!$C$2:$C$15000,0)),0,INDEX(TIRs!" & i & "$2:" & i &
"$15000,MATCH($C" & j & "TIRs!$C$2:$C$15000,0)))"
where i and j are the column and row indexes (Dimmed as Long) for
the ActiveCell. The variables do have the values. But I get the
following: Application-defined or object-defined error.

What I'm trying to do is pick up some data I lost from a previous
version of this workbook. If the cell is blank, there may be a
value that is supposed to be there on the previous version; look at
Column C for that same row and, if that value matches the value in
Col C on Sheet(TIRs), pull the value onto Sheet1.

I use the formula in my weekly updates and it works there - *BUT* I
use it without variables - it's inserted in row2 of the column and
run down. I can't do that here because the older version of the
data that has the lost data does not have new data I've inserted
before I discovered the problem. So I'm trying to insert this
modified formula into only blank cells so it picks up the
ActiveCell row and column.

Any help is appreciated.
Ed


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 118
Default HELP! Lost data - need to insert formula but get error!

Well, like I said:

"Frank Kabel" wrote in message
...
Hi
after inserting these two comas the formula is inserted for me
(replacing your variables with some dummy values)


<<snip

I use the formula in my weekly updates and it works there - *BUT* I
use it without variables - it's inserted in row2 of the column and
run down. I can't do that here because the older version of the
data that has the lost data does not have new data I've inserted
before I discovered the problem. So I'm trying to insert this
modified formula into only blank cells so it picks up the
ActiveCell row and column.


I need the variables to pick up the ActiveCell row and column indexes and
put them into the formula.
Ed




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default HELP! Lost data - need to insert formula but get error!

Hi Ed
then please your complete code (otherwise it's complicated to identify
your error)

--
Regards
Frank Kabel
Frankfurt, Germany


Ed wrote:
Well, like I said:

"Frank Kabel" wrote in message
...
Hi
after inserting these two comas the formula is inserted for me
(replacing your variables with some dummy values)


<<snip

I use the formula in my weekly updates and it works there - *BUT*
I use it without variables - it's inserted in row2 of the column
and run down. I can't do that here because the older version of
the data that has the lost data does not have new data I've
inserted before I discovered the problem. So I'm trying to insert
this modified formula into only blank cells so it picks up the
ActiveCell row and column.


I need the variables to pick up the ActiveCell row and column indexes
and put them into the formula.
Ed


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
File Error: Data may have been lost. gillmav Excel Discussion (Misc queries) 1 March 29th 07 08:02 AM
File Error:Data may be lost alantoni Excel Discussion (Misc queries) 3 May 13th 06 12:16 PM
File Error: Data May Have Been Lost Tbird2340 Excel Discussion (Misc queries) 8 March 20th 05 05:31 PM
File Error: Data May Have Been Lost Anthony Setting up and Configuration of Excel 7 March 20th 05 05:31 PM
File error: Data may have been lost. Yan-Hong Huang[MSFT] Excel Programming 0 April 6th 04 04:07 AM


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