Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Converting strings to numbers

I want to join the values of a range of cells (say 1, 2, 5, and 8) to produce
the number 1258, which can then be used in other calculations. Any ideas on
how to do this?

I'm using Excel from Office 2000

Many thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Converting strings to numbers

Formula
=--(C9&D9&E9&F9)

VBA code
varData = --(Range("C9") & Range("D9") & Range("E9") & Range("F9"))


--
Jacob (MVP - Excel)


"Big Bitty" wrote:

I want to join the values of a range of cells (say 1, 2, 5, and 8) to produce
the number 1258, which can then be used in other calculations. Any ideas on
how to do this?

I'm using Excel from Office 2000

Many thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default Converting strings to numbers

You can concatenate the ranges and then convert the result to a numerical
data type...

ComboNumber = CLng(Range("A1") & Range("E5") & Range("J8") & Range("H9"))

If you told us more about your set up (will cells vary in number, are they
always contiguous, are they always in a single column, etc.), we might be
able to give you better code.

--
Rick (MVP - Excel)



"Big Bitty" <Big wrote in message
...
I want to join the values of a range of cells (say 1, 2, 5, and 8) to
produce
the number 1258, which can then be used in other calculations. Any ideas
on
how to do this?

I'm using Excel from Office 2000

Many thanks


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
converting text strings into dates via135 Excel Worksheet Functions 6 November 18th 07 01:50 PM
converting concatenated text strings into formulas z.entropic Excel Worksheet Functions 0 June 5th 06 06:15 PM
Converting variable text strings to numeric Richgard53 Excel Discussion (Misc queries) 1 July 13th 05 06:22 AM
Converting strings to Sum worksheet function and control variables Spammastergrand Excel Programming 5 February 21st 04 05:12 PM
Problem with copying variable(s) to cell(s) and converting strings to mixed case Don Glass Excel Programming 4 August 17th 03 09:46 PM


All times are GMT +1. The time now is 03:24 AM.

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"