Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
File Error: Data may have been lost. | Excel Discussion (Misc queries) | |||
File Error:Data may be lost | Excel Discussion (Misc queries) | |||
File Error: Data May Have Been Lost | Excel Discussion (Misc queries) | |||
File Error: Data May Have Been Lost | Setting up and Configuration of Excel | |||
File error: Data may have been lost. | Excel Programming |