Why can't I do...
 

  You don't need to be an 'investor' to invest in Singletrack: 6 days left: 95% of target - Find out more

[Closed] Why can't I do this simple Excel thing?

18 Posts
9 Users
0 Reactions
112 Views
Posts: 0
Free Member
Topic starter
 

Got a long list of distances. All in cells A1 to A10000.

Then cells next to it (B1 to B10000) say either m (metres) or Km. Can I chuff make it so that C1 works (if B1="m", A1, A1*1000).

Help!

I can email the spreadsheet if that helps.

It's for my 2015 Transalp Adventure.

C


 
Posted : 12/04/2015 10:51 am
Posts: 17
Free Member
 

This works for me
=IF(B1="m",A1,A1*1000) Bracket in the wrong place for you.


 
Posted : 12/04/2015 10:53 am
Posts: 0
Free Member
Topic starter
 

no, still not working! Have emailed it to you, hope you dont mind?

C


 
Posted : 12/04/2015 11:00 am
Posts: 17
Free Member
 

your m in your sheet is actually "m "


 
Posted : 12/04/2015 11:05 am
Posts: 0
Free Member
Topic starter
 

Tried that and it didnt seem to do anything. Have you tried it?

c


 
Posted : 12/04/2015 11:06 am
Posts: 17
Free Member
 

I deleted the space after the m and it worked. excel seems to not like doing a comparison on "m "
If you want an auto correct something like =IF(LEN(B1)=2,LEFT(1),LEFT(2)) should return you the cropped characters.


 
Posted : 12/04/2015 11:09 am
Posts: 705
Free Member
 

or use =trim(B1)


 
Posted : 12/04/2015 11:10 am
Posts: 0
Free Member
Topic starter
 

ggrrrr still cant make anything work to simply return the metres or *1000 if it's Km

ggrrrrr

C


 
Posted : 12/04/2015 11:15 am
Posts: 0
Free Member
Topic starter
 

but have noticed tha the =trim command doesn't work on it either. what the heck???

C


 
Posted : 12/04/2015 11:17 am
Posts: 17
Free Member
 

Some of it works what I try it in your sheet, others don't. For the time it's taken and the number of KM entries I'd do a manual job on it.


 
Posted : 12/04/2015 11:20 am
Posts: 0
Free Member
Topic starter
 

oh.... errors here we come!

surely there should be a simple way?


 
Posted : 12/04/2015 11:22 am
Posts: 0
Full Member
 

Check the format of the cells. Sounds like there is variability which is stopping functions work some of the time.
Can you filter on the m / km ok?


 
Posted : 12/04/2015 11:23 am
Posts: 0
Free Member
Topic starter
 

No. I formatted them all as text, then tried it as 'geneal, then as 'numbers' but still didnt work. Have just done it al manually but a pain and I need to know why as I'm like that..

C


 
Posted : 12/04/2015 11:39 am
Posts: 0
Free Member
 

Copy paste special the values into a new workbook and apply the suggested formulas to the data in the new workbook


 
Posted : 12/04/2015 1:44 pm
Posts: 36
Free Member
 

apply a transformation to all the data such as =A1*100/100 which should force numerical format.


 
Posted : 12/04/2015 1:48 pm
Posts: 17
Free Member
 

sounds like a lot of data so sometimes it won't auto calculate. I think it is shift and f9 to force it is(once everything else is correct of course)


 
Posted : 12/04/2015 1:49 pm
Posts: 79
Free Member
 

ggrrrr still cant make anything work

When you type the formula in C1 & hit enter what do you actually see in C1?


 
Posted : 12/04/2015 3:46 pm
 poly
Posts: 8699
Free Member
 

Chris,

I looked at the actual content of the file you sent me through...

The cells DON'T contain "m<space>" they contain "m<unicode char 0A>" which is a 'non breaking space'.
Hence the IF= is not working
Similarly TRIM which removes spaces.

This does work:

=IF(LEFT(E4,1)="m",TRUE,FALSE)

So does this:

=IF(E4=$K$2,TRUE,FALSE)

if you simply copy & paste an "m<nbsp>" cell to K2

Or you can enter a non breaking space (Mac is ALT+Space, IIRC Windows is CTRL+SHFT+Space)

Or you can create it by puting this in cell K2:

="m"&CHAR(202)

Hope that explains!


 
Posted : 12/04/2015 4:02 pm
Posts: 0
Free Member
Topic starter
 

Poly,

thank you for your help. That makes sense. I was getting really annoyed! I had pasted in all the data from Memory Map from which we have all the Swiss and French maps and I have mde up the route that's about 380Km so a fair amount of workdone (so far!)

chers

Cx


 
Posted : 12/04/2015 4:11 pm

6 DAYS LEFT
We are currently at 95% of our target!