PC Review


Reply
Thread Tools Rate Thread

alpha character not populating in DBA table

 
 
=?Utf-8?B?VHJlYm9y?=
Guest
Posts: n/a
 
      23rd Jul 2007
I am trying to debug an existing Excel program that is not pulling data from
one specific column in multiple worksheets. All other columns are numeric
data and populate correctly when the VB macro in run.

The cell formula below converts a numeric indicator from a separate
worksheet, to either the alpha character 'C' or leaves the cell blank.

=IF(VLOOKUP(A11,Usage,'Inputs-Usage'!$FF$6,FALSE)<>1,"C","")

The VB code in the macro module that provides the cell data to a .cvs file
is as follows;

''==== Per Steve, this should not be changed to Zero but should be null, or
real value, 09/13/2006
If IsError(Item.Range("Q" & intCounter).Address) = True Then
newVal = ""
Else
newVal = Item.Range("Q" & intCounter).Value
End If

Column 'Q' is the source for the alpha character to the .cvs file from which
the final report data is pulled.

The variable 'intCounter is as follows;

For intCounter = 9 To intNumberOfDayRows + 8

Can someone provide a possible solution to this problem.

Thank you
--
TWN
 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      23rd Jul 2007
If IsError(Item.Range("Q" & intCounter).Address) = True Then
will never be true. An address can not be an error detectable by IsError.
If you mean the value in the cell (such as #N/A) then

If IsError(Item.Range("Q" & intCounter).Value) = True Then

Also, Item doesn't seem to be the best choice as an object variable since so
many objects have items as properties - it could make your code harder to
read and understand (or maybe not <g>).

--
Regards,
Tom Ogilvy

"Trebor" wrote:

> I am trying to debug an existing Excel program that is not pulling data from
> one specific column in multiple worksheets. All other columns are numeric
> data and populate correctly when the VB macro in run.
>
> The cell formula below converts a numeric indicator from a separate
> worksheet, to either the alpha character 'C' or leaves the cell blank.
>
> =IF(VLOOKUP(A11,Usage,'Inputs-Usage'!$FF$6,FALSE)<>1,"C","")
>
> The VB code in the macro module that provides the cell data to a .cvs file
> is as follows;
>
> ''==== Per Steve, this should not be changed to Zero but should be null, or
> real value, 09/13/2006
> If IsError(Item.Range("Q" & intCounter).Address) = True Then
> newVal = ""
> Else
> newVal = Item.Range("Q" & intCounter).Value
> End If
>
> Column 'Q' is the source for the alpha character to the .cvs file from which
> the final report data is pulled.
>
> The variable 'intCounter is as follows;
>
> For intCounter = 9 To intNumberOfDayRows + 8
>
> Can someone provide a possible solution to this problem.
>
> Thank you
> --
> TWN

 
Reply With Quote
 
=?Utf-8?B?VHJlYm9y?=
Guest
Posts: n/a
 
      23rd Jul 2007
Thanks for the comments Mr O. I will keep chipping away at this code.
--
TWN


"Tom Ogilvy" wrote:

> If IsError(Item.Range("Q" & intCounter).Address) = True Then
> will never be true. An address can not be an error detectable by IsError.
> If you mean the value in the cell (such as #N/A) then
>
> If IsError(Item.Range("Q" & intCounter).Value) = True Then
>
> Also, Item doesn't seem to be the best choice as an object variable since so
> many objects have items as properties - it could make your code harder to
> read and understand (or maybe not <g>).
>
> --
> Regards,
> Tom Ogilvy
>
> "Trebor" wrote:
>
> > I am trying to debug an existing Excel program that is not pulling data from
> > one specific column in multiple worksheets. All other columns are numeric
> > data and populate correctly when the VB macro in run.
> >
> > The cell formula below converts a numeric indicator from a separate
> > worksheet, to either the alpha character 'C' or leaves the cell blank.
> >
> > =IF(VLOOKUP(A11,Usage,'Inputs-Usage'!$FF$6,FALSE)<>1,"C","")
> >
> > The VB code in the macro module that provides the cell data to a .cvs file
> > is as follows;
> >
> > ''==== Per Steve, this should not be changed to Zero but should be null, or
> > real value, 09/13/2006
> > If IsError(Item.Range("Q" & intCounter).Address) = True Then
> > newVal = ""
> > Else
> > newVal = Item.Range("Q" & intCounter).Value
> > End If
> >
> > Column 'Q' is the source for the alpha character to the .cvs file from which
> > the final report data is pulled.
> >
> > The variable 'intCounter is as follows;
> >
> > For intCounter = 9 To intNumberOfDayRows + 8
> >
> > Can someone provide a possible solution to this problem.
> >
> > Thank you
> > --
> > TWN

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do i use sumproduct if my lookup table is alpha or alpha num? Angie Microsoft Excel Worksheet Functions 0 23rd Jan 2010 02:24 AM
Test if Last Character in Column of Cells is Alpha Character Benjamin Microsoft Excel Programming 6 21st Sep 2009 06:36 PM
if alpha character samuel Microsoft Excel Misc 3 17th Dec 2008 03:22 AM
Incrementing an alpha character Francis Hookham Microsoft Excel Programming 11 9th Oct 2007 07:00 PM
MAX SQL for Alpha character Rob Thompson Microsoft Access Queries 5 23rd Sep 2003 08:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:11 AM.