Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default "" is not blank

i have an equation in my worksheet: =if(a1=0,"",1) (or any equation that
returns "")
then i have code that copies the value, then pastespecial (values) into
column B, so that i have the actual value and not the equation. the problem i
am having is that when i paste, the value of "", is not blank. it messes up
vlookup or sum...etc. so i guess i need to delete if = "" or something like
that

please help

thank you
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default "" is not blank

also if if i sort the data AZ, all the blank rows go first

"choice" wrote:

i have an equation in my worksheet: =if(a1=0,"",1) (or any equation that
returns "")
then i have code that copies the value, then pastespecial (values) into
column B, so that i have the actual value and not the equation. the problem i
am having is that when i paste, the value of "", is not blank. it messes up
vlookup or sum...etc. so i guess i need to delete if = "" or something like
that

please help

thank you

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default "" is not blank

It is an empty text string. That won't mess up SUM and other functions that
ignore text. It shouldn't matter with VLOOKUP if you use 0 for the last
argument. It probably WILL mess up sorting: these cells will come before cells
containing text and truly empty cells.

On Sun, 12 Sep 2004 00:47:04 -0700, choice
wrote:

i have an equation in my worksheet: =if(a1=0,"",1) (or any equation that
returns "")
then i have code that copies the value, then pastespecial (values) into
column B, so that i have the actual value and not the equation. the problem i
am having is that when i paste, the value of "", is not blank. it messes up
vlookup or sum...etc. so i guess i need to delete if = "" or something like
that

please help

thank you


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default "" is not blank

another way to do it so it doesn't happen is

DestSheet.Range("B9").Value = Sourcesheet.Range("C31").Value
or for a multicell contiguous range
DestSheet.Range("B9:B11").Value = Sourcesheet.Range("C31:C33").Value

This won't put a null string in the cell. This is just an example, but you
should be able to adapt it to your code.

--
Regards,
Tom Ogilvy

"choice" wrote in message
...
i have an equation in my worksheet: =if(a1=0,"",1) (or any equation that
returns "")
then i have code that copies the value, then pastespecial (values) into
column B, so that i have the actual value and not the equation. the

problem i
am having is that when i paste, the value of "", is not blank. it messes

up
vlookup or sum...etc. so i guess i need to delete if = "" or something

like
that

please help

thank you



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default "" is not blank

Dim DestSheet as Worksheet
Dim SourceSheet as Worksheet
Set DestSheet = Worksheets("Sheet1")
Set SourceSheet = Worksheets("Sheet2")

--
Regards,
Tom Ogilvy

"choice" wrote in message
...
yea that works...just one question.
how do i define my sourcesheet and destsheet.? i tried but cannot get it

right

"Tom Ogilvy" wrote:

another way to do it so it doesn't happen is

DestSheet.Range("B9").Value = Sourcesheet.Range("C31").Value
or for a multicell contiguous range
DestSheet.Range("B9:B11").Value = Sourcesheet.Range("C31:C33").Value

This won't put a null string in the cell. This is just an example, but

you
should be able to adapt it to your code.

--
Regards,
Tom Ogilvy

"choice" wrote in message
...
i have an equation in my worksheet: =if(a1=0,"",1) (or any equation

that
returns "")
then i have code that copies the value, then pastespecial (values)

into
column B, so that i have the actual value and not the equation. the

problem i
am having is that when i paste, the value of "", is not blank. it

messes
up
vlookup or sum...etc. so i guess i need to delete if = "" or something

like
that

please help

thank you








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 84
Default "" is not blank

thanks that worked perfectly. one more question

Dim DestSheet As Worksheet, sourceSheet As Worksheet
Set sourceSheet = worksheets("accessories")

Set DestSheet = worksheets("sale")

DestSheet.Range("b2:b8").Value = sourceSheet.Range("b2,b4,b6,b8").Value
the prolem is that it puts sourcesheet "b2" into destsheet "b2:b8" is there
a way to have it skip the blanks in the source?

"Tom Ogilvy" wrote:

Dim DestSheet as Worksheet
Dim SourceSheet as Worksheet
Set DestSheet = Worksheets("Sheet1")
Set SourceSheet = Worksheets("Sheet2")

--
Regards,
Tom Ogilvy

"choice" wrote in message
...
yea that works...just one question.
how do i define my sourcesheet and destsheet.? i tried but cannot get it

right

"Tom Ogilvy" wrote:

another way to do it so it doesn't happen is

DestSheet.Range("B9").Value = Sourcesheet.Range("C31").Value
or for a multicell contiguous range
DestSheet.Range("B9:B11").Value = Sourcesheet.Range("C31:C33").Value

This won't put a null string in the cell. This is just an example, but

you
should be able to adapt it to your code.

--
Regards,
Tom Ogilvy

"choice" wrote in message
...
i have an equation in my worksheet: =if(a1=0,"",1) (or any equation

that
returns "")
then i have code that copies the value, then pastespecial (values)

into
column B, so that i have the actual value and not the equation. the
problem i
am having is that when i paste, the value of "", is not blank. it

messes
up
vlookup or sum...etc. so i guess i need to delete if = "" or something
like
that

please help

thank you






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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
If A3=alpha numeric,"X", if A3=text,"Y", Blank Gary Excel Worksheet Functions 16 August 8th 06 08:27 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
Changing "returned" values from "0" to "blank" LATATC Excel Worksheet Functions 2 October 20th 05 04:41 PM


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