#1   Report Post  
Jo
 
Posts: n/a
Default cell info

thanks that works great, however the return does not seem to be a number
if the answer is 123 I cannot then use it in a formula

If I have "123456789" in a cell I wish to copy specifc parts of it to other
cells
i.e.
A1 first 3 - 123
A2 second 3 - 456
A3 third 3 - 789
How can I do this both in a worksheet and using VBA.
Thanks
Jo

  #2   Report Post  
Ken
 
Posts: n/a
Default

Jo, if you enter "123456789" in A1, "=LEFT(A1,3)" in B1, and "=B1*2" in C1,
what do you get returned in C1?

"Jo" wrote:

thanks that works great, however the return does not seem to be a number
if the answer is 123 I cannot then use it in a formula

If I have "123456789" in a cell I wish to copy specifc parts of it to other
cells
i.e.
A1 first 3 - 123
A2 second 3 - 456
A3 third 3 - 789
How can I do this both in a worksheet and using VBA.
Thanks
Jo

  #3   Report Post  
Jo
 
Posts: n/a
Default

this works, but does not work in my nested if function
the if function is fine if I type 123 in
thanks
Jo

"Ken" wrote:

Jo, if you enter "123456789" in A1, "=LEFT(A1,3)" in B1, and "=B1*2" in C1,
what do you get returned in C1?

"Jo" wrote:

thanks that works great, however the return does not seem to be a number
if the answer is 123 I cannot then use it in a formula

If I have "123456789" in a cell I wish to copy specifc parts of it to other
cells
i.e.
A1 first 3 - 123
A2 second 3 - 456
A3 third 3 - 789
How can I do this both in a worksheet and using VBA.
Thanks
Jo

  #4   Report Post  
Ken
 
Posts: n/a
Default

Jo, sorry, but I don't follow you exactly.
Could you tell me exctly what you have in which cells so I can replicate it
and try to help further? You say you have a nested if function somewhere?

"Jo" wrote:

this works, but does not work in my nested if function
the if function is fine if I type 123 in
thanks
Jo

"Ken" wrote:

Jo, if you enter "123456789" in A1, "=LEFT(A1,3)" in B1, and "=B1*2" in C1,
what do you get returned in C1?

"Jo" wrote:

thanks that works great, however the return does not seem to be a number
if the answer is 123 I cannot then use it in a formula

If I have "123456789" in a cell I wish to copy specifc parts of it to other
cells
i.e.
A1 first 3 - 123
A2 second 3 - 456
A3 third 3 - 789
How can I do this both in a worksheet and using VBA.
Thanks
Jo

  #5   Report Post  
RagDyer
 
Posts: n/a
Default

Try this:

=--Left(A1,3)
=--RIGHT(A1,3)
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

"Jo" wrote in message
...
this works, but does not work in my nested if function
the if function is fine if I type 123 in
thanks
Jo

"Ken" wrote:

Jo, if you enter "123456789" in A1, "=LEFT(A1,3)" in B1, and "=B1*2" in

C1,
what do you get returned in C1?

"Jo" wrote:

thanks that works great, however the return does not seem to be a number
if the answer is 123 I cannot then use it in a formula

If I have "123456789" in a cell I wish to copy specifc parts of it to

other
cells
i.e.
A1 first 3 - 123
A2 second 3 - 456
A3 third 3 - 789
How can I do this both in a worksheet and using VBA.
Thanks
Jo




  #6   Report Post  
kraljb
 
Posts: n/a
Default


The reason it is not working in your nested if function is that the
left, right, and mid fuctions all treat it as text. You would have to
do the following to use it in your if function as a number.

=LEFT($A$1, 3)*1
=MID($A$1,4,3)*1
=RIGHT($A$1,3)*1


--
kraljb
------------------------------------------------------------------------
kraljb's Profile: http://www.excelforum.com/member.php...fo&userid=9955
View this thread: http://www.excelforum.com/showthread...hreadid=276446

  #7   Report Post  
Jo
 
Posts: n/a
Default

it's okay missed "" off the if statement, 789 should have been "789"

"Ken" wrote:

Jo, sorry, but I don't follow you exactly.
Could you tell me exctly what you have in which cells so I can replicate it
and try to help further? You say you have a nested if function somewhere?

"Jo" wrote:

this works, but does not work in my nested if function
the if function is fine if I type 123 in
thanks
Jo

"Ken" wrote:

Jo, if you enter "123456789" in A1, "=LEFT(A1,3)" in B1, and "=B1*2" in C1,
what do you get returned in C1?

"Jo" wrote:

thanks that works great, however the return does not seem to be a number
if the answer is 123 I cannot then use it in a formula

If I have "123456789" in a cell I wish to copy specifc parts of it to other
cells
i.e.
A1 first 3 - 123
A2 second 3 - 456
A3 third 3 - 789
How can I do this both in a worksheet and using VBA.
Thanks
Jo

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
Maintaining cell reference after sorting GRITS Excel Discussion (Misc queries) 2 April 30th 23 07:42 PM
inserting data from a row to a cell, when the row number is specified by a formula in a cell [email protected] New Users to Excel 2 January 6th 05 07:18 AM
Addition to Turn cell red if today is greater or equal to date in cell Rich New Users to Excel 2 December 9th 04 02:06 AM
cell info Jo Excel Worksheet Functions 2 November 8th 04 11:29 PM
VLookup resulting in a blank cell... KempensBoerke Excel Worksheet Functions 1 October 28th 04 09:57 PM


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