Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 477
Default R/T error 1004 - App-defin or obj defin error on last presented li

Sub PrepDepsAndWiths()
Sheets("ImportWorkTable").Select
ActiveSheet.UsedRange.Offset(1, 0).Copy
Sheets("DepositsAndWithdrawals").Range("D2")
Sheets("DepositsAndWithdrawals").Activate
Range("A1").Select
Beglrow = Cells(Rows.Count, "D").End(xlUp).Row ' = 589
ActiveSheet.Range("B2:B" & Beglrow).Formula = "=IF(ISNUMBER(D2),D2,"")"
<<Bombing here (this line)

Can someone assist?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default R/T error 1004 - App-defin or obj defin error on last presented li

Hi Jim,

Try replacing:

ActiveSheet.Range("B2:B" & Beglrow).Formula = "=IF(ISNUMBER(D2),D2,"")"


with

ActiveSheet.range("B2:B" & BeglRow).Formula = _
"=IF(ISNUMBER(D2),D2,)"

---
Regards,
Norman



"Jim May" wrote in message
...
Sub PrepDepsAndWiths()
Sheets("ImportWorkTable").Select
ActiveSheet.UsedRange.Offset(1, 0).Copy
Sheets("DepositsAndWithdrawals").Range("D2")
Sheets("DepositsAndWithdrawals").Activate
Range("A1").Select
Beglrow = Cells(Rows.Count, "D").End(xlUp).Row ' = 589
ActiveSheet.Range("B2:B" & Beglrow).Formula = "=IF(ISNUMBER(D2),D2,"")"
<<Bombing here (this line)

Can someone assist?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default R/T error 1004 - App-defin or obj defin error on last presented li

Hi Jim,

My suggested line should have read:

ActiveSheet.range("B2:B" & BeglRow).Formula = _
"=IF(ISNUMBER(D2),D2,"""")"

---
Regards,
Norman


"Norman Jones" wrote in message
...
Hi Jim,

Try replacing:

ActiveSheet.Range("B2:B" & Beglrow).Formula = "=IF(ISNUMBER(D2),D2,"")"


with

ActiveSheet.range("B2:B" & BeglRow).Formula = _
"=IF(ISNUMBER(D2),D2,)"

---
Regards,
Norman



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 477
Default R/T error 1004 - App-defin or obj defin error on last presente

Norman;
I changed your original code;
And the Second line problem (posted seperate) works just fine.
No problems, thanks to you.
Jim

"Norman Jones" wrote:

Hi Jim,

My suggested line should have read:

ActiveSheet.range("B2:B" & BeglRow).Formula = _
"=IF(ISNUMBER(D2),D2,"""")"

---
Regards,
Norman


"Norman Jones" wrote in message
...
Hi Jim,

Try replacing:

ActiveSheet.Range("B2:B" & Beglrow).Formula = "=IF(ISNUMBER(D2),D2,"")"


with

ActiveSheet.range("B2:B" & BeglRow).Formula = _
"=IF(ISNUMBER(D2),D2,)"

---
Regards,
Norman




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 477
Default R/T error 1004 - App-defin or obj defin error on last presente

Norman, thanks that got me past that line;
However the next and final such formula statement is now causing the same
problem -- currently it is:

Activesheet.Range("C2:C" & Beglrow).Formula =
"=IF(AND(ISNUMBER(B2),LEN(H2)12),""Credit"",IF(AN D(ISNUMBER(B2),LEN(H2)<12),""Debit"",""))"

I can't recognize the syntax problem with the above -- can you assist?

TIA,
Jim


"Norman Jones" wrote:

Hi Jim,

Try replacing:

ActiveSheet.Range("B2:B" & Beglrow).Formula = "=IF(ISNUMBER(D2),D2,"")"


with

ActiveSheet.range("B2:B" & BeglRow).Formula = _
"=IF(ISNUMBER(D2),D2,)"

---
Regards,
Norman



"Jim May" wrote in message
...
Sub PrepDepsAndWiths()
Sheets("ImportWorkTable").Select
ActiveSheet.UsedRange.Offset(1, 0).Copy
Sheets("DepositsAndWithdrawals").Range("D2")
Sheets("DepositsAndWithdrawals").Activate
Range("A1").Select
Beglrow = Cells(Rows.Count, "D").End(xlUp).Row ' = 589
ActiveSheet.Range("B2:B" & Beglrow).Formula = "=IF(ISNUMBER(D2),D2,"")"
<<Bombing here (this line)

Can someone assist?






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default R/T error 1004 - App-defin or obj defin error on last presente

Hi Jim,

Try:

ActiveSheet.range("C2:C" & BeglRow).Formula = _
"=IF(AND(ISNUMBER(B2),LEN(H2)12),""Credit""," & _
"IF(AND(ISNUMBER(B2),LEN(H2)<12),""Debit"",""" "))"

---
Regards,
Norman



"Jim May" wrote in message
...
Norman, thanks that got me past that line;
However the next and final such formula statement is now causing the same
problem -- currently it is:

Activesheet.Range("C2:C" & Beglrow).Formula =
"=IF(AND(ISNUMBER(B2),LEN(H2)12),""Credit"",IF(AN D(ISNUMBER(B2),LEN(H2)<12),""Debit"",""))"

I can't recognize the syntax problem with the above -- can you assist?

TIA,
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
Error 1004, Application-definded or object-defined error Mirco Wilhelm[_2_] Excel Programming 9 January 7th 06 04:56 PM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
naming tab macro error runtime error 1004 D Excel Programming 3 February 28th 05 01:32 AM


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