Returning a value problem.

dtman85

New Member
Joined
Dec 23, 2014
Messages
44
I copied a big data file from two websites and pasted into two worksheets, over 10,000 rows of data.
Worksheet 1
NameYearSalary
John Smith20161,500
Eric Smith20152,500

<tbody>
</tbody>

Worksheet 2
YearNameSalarywin
2016John Smith100
2015Eric Smith50

<tbody>
</tbody>

In worksheet 2, under the salary column, I used the sumifs formula to return the value of salary from worksheet one to two but I get a value of "0"for each cell. When I retyped the pasted names "John Smith" to "John Smith" on worksheet 2, I get the correct return value. Both cells from worksheet 1 & 2 are in the general format.

How can I solve this because is not ideal to retype all the pasted names?

Thanks in Advance.
 
Last edited:

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Are these the actual values? They are identical so it's hard to say what your issue is.

You could try =TRIM() or paste in the cell values here.
 
Last edited:
Upvote 0
If you are copying this data from another application, you may be getting extra trailing or leading spaces in the text. Also, often, values brought in that way, are brought in as text, not numbers, so you need to test both of those.

For the extra spaces, do a quick test using EXACT(cell-1, cell-2)
For the numbers, use =ISNUMBER(cell-1)
 
Upvote 0
If you are copying this data from another application, you may be getting extra trailing or leading spaces in the text. Also, often, values brought in that way, are brought in as text, not numbers, so you need to test both of those.

For the extra spaces, do a quick test using EXACT(cell-1, cell-2)
For the numbers, use =ISNUMBER(cell-1)

I got a "false" result for the Exact test for the name columns but a “True” for the numbers test for the salary column. I tried to trim both columns and still got a “false”result.
 
Last edited:
Upvote 0
Are these the actual values? They are identical so it's hard to say what your issue is.

You could try =TRIM() or paste in the cell values here.

Here is the two values from WS1 and WS2.

Brad Ziegler
Brad Ziegler

<tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
There may be a hidden character that one of the websites uses for formatting.
Check the length of each text string with the LEN function to see if they are different.
 
Upvote 0
There may be a hidden character that one of the websites uses for formatting.
Check the length of each text string with the LEN function to see if they are different.

One cell is 13 and the other is 12 strings with the Len function. How can I get them to match?
 
Upvote 0
The next step is to try and find out what the hidden character is.
See the example below that will break the string into its parts (formula in B1) then use the formula in (C1) to get the code number. Copy formulas down the column. Once you have that you should be able to use the FIND & Replace to remove it. Sometimes the CLEAN function in Excel will remove the character, but often it doesn't.
Excel Workbook
ABC
1Brad ZieglerB66
2r114
3a97
4d100
532
6Z90
7i105
8e101
9g103
10l108
11e101
12r114
Sheet
 
Upvote 0
Looks like the problem is the CODE(10).
The CLEAN function should remove that code for you.
Excel Workbook
ABCDEF
1Brad ZieglerB66Brad Ziegler12
2r114
3a97
4d100
532
610
7Z90
8i105
9e101
10g103
11l108
12e101
13r114
Sheet
 
Upvote 0
Looks like the problem is the CODE(10).
The CLEAN function should remove that code for you.

ABCDEF
1Brad
Ziegler
B66 Brad Ziegler12
2 r114
3 a97
4 d100
5 32
6 10
7 Z90
8 i105
9 e101
10 g103
11 l108
12 e101
13 r114

<colgroup><col style="width:30px; "><col style="width:80px;"><col style="width:71px;"><col style="width:64px;"><col style="width:64px;"><col style="width:99px;"><col style="width:49px;"></colgroup><tbody>
</tbody>

Spreadsheet Formulas
CellFormula
B1=MID($A$1,ROWS($1:1),1)
C1=CODE(B1)
E1=CLEAN(A1)
F1=LEN(E1)

<tbody>
</tbody>

<tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4


The two worksheets strings match now. Thanks for all the great tips!
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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