Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default Setting Cell Number Format With A Worksheet Function

Excel 2003, SP2 win Win XP, SP2

Trying to use a VLookup to present user-selectable information from an
Excel range. The range contains large and small numbers, percents and
currency values in it - and VLookup doesn't seem to return the cell
number formatting of the "looked-up" cell.

I've kludged a way to get the formatting from the looked-up cell and
apply it to the cell doing the lookup, but what I'm doing converts the
looked-up cell's value to a text (I'm using the TEXT worksheet
function) - and that keeps me from doing summations, etc.

Is there any way to set a cell's number format with a combination of
built-in or user-defined worksheet functions that can co-exist with a
VLookup, HLookup or Match function?

Thanks in advance for any help!

James

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Billigmeier
 
Posts: n/a
Default Setting Cell Number Format With A Worksheet Function

There's no way to set a cell format with a function.

There is a workaround to what you are doing, though. Lets say your range of
returned values is B1:B100 (the results of the VLOOKUP's). Whenever you call
that range for a calculation, included it within the VALUE() function. For
example:

=SUM(VALUE(B1:B100))

And then commit it with CTRL+SHIFT+ENTER as it is an array function. This
way you can still do calculations on the text values in this range.

--
Regards,
Dave


" wrote:

Excel 2003, SP2 win Win XP, SP2

Trying to use a VLookup to present user-selectable information from an
Excel range. The range contains large and small numbers, percents and
currency values in it - and VLookup doesn't seem to return the cell
number formatting of the "looked-up" cell.

I've kludged a way to get the formatting from the looked-up cell and
apply it to the cell doing the lookup, but what I'm doing converts the
looked-up cell's value to a text (I'm using the TEXT worksheet
function) - and that keeps me from doing summations, etc.

Is there any way to set a cell's number format with a combination of
built-in or user-defined worksheet functions that can co-exist with a
VLookup, HLookup or Match function?

Thanks in advance for any help!

James


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
Instead of a negative number, I'd like to show zero... Dr. Darrell Excel Worksheet Functions 6 December 7th 05 08:21 PM
" / " Changing Decimal number format to Fraction on Protected Cell laudie Excel Worksheet Functions 0 November 15th 05 02:13 AM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
I want to format a number cell without the decimal and without ro. LAM Excel Discussion (Misc queries) 8 April 20th 05 04:59 PM
#VALUE in cell but pop up function box show right number Ted Dalton Excel Discussion (Misc queries) 1 December 14th 04 03:15 PM


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