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
[TABLE="width: 500"]
<tbody>[TR]
[TD]Name[/TD]
[TD]Year[/TD]
[TD]Salary[/TD]
[/TR]
[TR]
[TD]John Smith[/TD]
[TD]2016[/TD]
[TD]1,500[/TD]
[/TR]
[TR]
[TD]Eric Smith[/TD]
[TD]2015[/TD]
[TD]2,500[/TD]
[/TR]
</tbody>[/TABLE]

Worksheet 2
[TABLE="width: 500"]
<tbody>[TR]
[TD]Year[/TD]
[TD]Name[/TD]
[TD]Salary[/TD]
[TD]win[/TD]
[/TR]
[TR]
[TD]2016[/TD]
[TD]John Smith[/TD]
[TD][/TD]
[TD]100[/TD]
[/TR]
[TR]
[TD]2015[/TD]
[TD]Eric Smith[/TD]
[TD][/TD]
[TD]50[/TD]
[/TR]
</tbody>[/TABLE]

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

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
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.

[TABLE="width: 148"]
<tbody>[TR]
[TD="width: 148"]Brad Ziegler
[TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64"]Brad Ziegler[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
 
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
Brad
Ziegler
B Brad Ziegler
r
a
d
Z
i
e
g
l
e
r

<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>
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]1[/TD]

[TD="align: right"]66[/TD]

[TD="align: right"]12[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]2[/TD]

[TD="align: right"]114[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]3[/TD]

[TD="align: right"]97[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]4[/TD]

[TD="align: right"]100[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]5[/TD]

[TD="align: right"]32[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]6[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ffff00]#ffff00[/URL] "][/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=ffff00]#ffff00[/URL] , align: right"]10[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]7[/TD]

[TD="align: right"]90[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]8[/TD]

[TD="align: right"]105[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]9[/TD]

[TD="align: right"]101[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]10[/TD]

[TD="align: right"]103[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]11[/TD]

[TD="align: right"]108[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]12[/TD]

[TD="align: right"]101[/TD]

[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=cacaca]#cacaca[/URL] , align: center"]13[/TD]

[TD="align: right"]114[/TD]

</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,224,820
Messages
6,181,157
Members
453,021
Latest member
Justyna P

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