simple if/then stuff

Mr Krayzie

New Member
Joined
Feb 22, 2002
Messages
8
Sorry forthis I'm new to excel and hope someone can help me.
Problem: 2 columns of numbers/
I need all the numbers above the value of 500
to have 500 taken off and a U added to them.
I have managed it but it means having to have not just the two original colums but four more.
below is an exmaple of what i want.


A B C D
576 674 to 76U 174U
128 496 to 128 128
364 222 364 222
971 777 471U 277U
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
=IF(A1>500,A1-500&"U",A1)

Can it be as simple as that?
 
Upvote 0
Are you sure? I am only changing numbers that are OVER 500, otherwise, it keeps the SAME number. Perhaps it looks like a formula you tried but is slightly different? Or perhaps you're doing something with column B that I'm not aware of.
 
Upvote 0
Doh, I must have something strange going on in that column. I tried pastin the column to a new book and tried it, it works.

Thanks very much.

Possibly something to do with the fact I entered the data in access then imported it.
 
Upvote 0
Still hasnt worked. When I copied the entire column over it still made negative numbers. I've noticed ir's aligned to the left for some reason.
 
Upvote 0
Perhaps your numbers are being read as text. If so, then it is subtracting 500 from zero (probably). Do this to the numbers you're brining over:

Put a one in any cell. Copy that cell.
Select your *bad* numbers.
Hit Edit-Paste special-Multiply.
This forces Excel to see them as numbers.
If there are spaces or something in the cell besides the text-formatted numbers, it won't work. If you've got a query or something that is getting the numbers from Access, let me know what it's doing. In your Access DB, is that column in the table formatted as text or numbers?
 
Upvote 0
now I've tried typing the same numbers manually into another colum doing the formula for that colum and it works!!!!!!
I'm going to have to type the whole thing manually.
 
Upvote 0
tried the edit paste special multiply thing. I get a column of zeros.
I'm going to re tpye it in excel.

Mr Gates has won again.
 
Upvote 0
"zer case is sol-ved" as Inspector Cluseau would say. My access in put thing was set as "text" and not "number". Now changed it and copied all and it works fine. Such a silly little mistake.
Thank you everyone.
 
Upvote 0

Forum statistics

Threads
1,214,387
Messages
6,119,225
Members
448,877
Latest member
gb24

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top