formula for binary to decimial not working right

richsark

Board Regular
Joined
Mar 24, 2007
Messages
125
Hello All, I honestly forget who helped me with this back in Dec 08, I tried to look for my thread, but I cant find it.

Anyway, this formula was working great since 12-08, but someone came to me yesterday saying there is a flaw in the formula between Company A and Company B

If you note that 10.125.239.0/24 is overlapped with 10.125.236.0/22, yet is marked FALSE
FindDuplicateIPRanges12-26-08-v7-Sorted.xls
ABCDEFGHIJKLM
7221CompanyA10.125.236.0255.255.252.0371148121760245761023176025599TRUE
7222CompanyA10.125.237.0255.255.255.037114812176024832255176025087TRUE
7223CompanyA10.125.239.0255.255.255.037114812176025344255176025599FALSE
7224CompanyB10.125.240.0255.255.255.037114812176025600255176025855TRUE
7225CompanyB10.125.240.0255.255.255.252371148121760256003176025603TRUE
DottedDecimalMasks



Can someone please look at the formula to see where the calculation is flawed.

Thanks
 
I have been looking this over and I am wondering about this formula. Have you done these manually (with a calculator) and seen if you are getting what you want for sure. I know Excel works on the MDAS principle, but are they actually calculating what you want?

=MID(IP_Address,1,_1stDotIP-1)*256*256*256+MID(IP_Address,_1stDotIP+1,_2ndDotIP-_1stDotIP-1)*256*256+MID(IP_Address,_2ndDotIP+1,_3rdDotIP-_2ndDotIP-1)*256+MID(IP_Address,_3rdDotIP+1,LEN(IP_Address)-_3rdDotIP)

If so, I am at a loss. I wish I could be better help.
 
Upvote 0

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
HI Bill, I think the issue is in the column M
FindDuplicateIPRanges-1.xls
MNOP
2FALSE
DottedDecimalMasks


where the true and false are set. I think it fails for overlapping subnets that were not adjacent to each other. I am not that savvy to prove it, but perhaps thats the cause.

There is a possibility that it could miss in the other direction as well.

Thanks
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,241
Members
449,075
Latest member
staticfluids

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