+ Reply to Thread
Results 1 to 2 of 2

Evaluate columns for sequential numbers and roll up

  1. #1
    Registered User
    Join Date
    05-01-2015
    Location
    Memphis, TN
    MS-Off Ver
    2010
    Posts
    1

    Evaluate columns for sequential numbers and roll up

    I am attempting to evaluate values for 3 digit zip code Origins and Destinations. I have the following data (sample) that is being used by my formula. I'm trying to roll up all of the destination zip3's (column 3) into ranges and plug those into columns 6 and 7 and their corresponding origin zip ranges from column 1 and 2 and plug those into col 4 and 5. Below the sample data is the VBA code I'm using. Where I am getting hung up is when the origin range goes from 005 (for example) to the next origin range 010 - 011, the destination range is incorrect. The last row for 005 should be 267 - 267 and the first row for 010 - 011 should have dest 130 - 132. I am losing 130 along the way.

    orig1 orig 2dest1org res1org res2des res1des res2
    005 005 014 005 005 014 014
    005 005 019 005 005 019 019
    005 005 025 005 005 025 026
    005 005 026 005 005 030 033
    005 005 030 005 005 035 043
    005 005 031 005 005 045 045
    005 005 032 005 005 050 051
    005 005 033 005 005 054 054
    005 005 035 005 005 056 059
    005 005 036 005 005 128 136
    005 005 037 005 005 140 142
    005 005 038 005 005 144 149
    005 005 039 005 005 155 155
    005 005 040 005 005 157 159
    005 005 041 005 005 163 163
    005 005 042 005 005 166 169
    005 005 043 005 005 173 174
    005 005 045 005 005 177 177
    005 005 050 005 005 200 218
    005 005 051 005 005 220 238
    005 005 054 005 005 254 254
    005 005 056 267 267
    005 005 057 010 011 132 132
    005 005 058 136 136
    005 005 059 010 012 042 042
    005 005 128 010 012 045 045
    005 005 129 010 012 129 129
    005 005 130 010 012 206 208
    005 005 131 010 012 214 214
    005 005 132 216 216
    005 005 133 010 013 043 043
    005 005 134 010 013 140 142
    005 005 135 010 013 166 168
    005 005 136 010 013 173 174
    005 005 140 210 210
    005 005 141 010 016 146 146
    005 005 142 177 177
    005 005 144 011 011 086 086
    005 005 145 011 011 182 182
    005 005 146 184 184
    005 005 147 012 012 041 041
    005 005 148 012 012 143 143
    005 005 149 012 012 147 147
    005 005 155 012 012 158 159
    005 005 157 012 012 200 205
    005 005 158 012 012 209 209
    005 005 159 012 012 220 223
    005 005 163 254 254
    005 005 166 013 013 049 049
    005 005 167 130 130
    005 005 168 013 039 086 086
    005 005 169 013 039 182 182
    005 005 173 184 184
    005 005 174 014 014 005 005
    005 005 177 014 014 047 047
    005 005 200 014 014 070 076
    005 005 201 014 014 079 079
    005 005 202 014 014 100 105
    005 005 203 014 014 107 108
    005 005 204 014 014 110 118
    005 005 205 133 133
    005 005 206 015 016 048 048
    005 005 207 173 173
    005 005 208 015 029 049 049
    005 005 209 129 129
    005 005 210 017 042 076 076
    005 005 211 017 042 079 079
    005 005 212 017 042 100 104
    005 005 213 017 042 110 113
    005 005 214 017 042 116 116
    005 005 215 018 018 170 172
    005 005 216 018 018 178 178
    005 005 217 199 199
    005 005 218 019 019 005 005
    005 005 220 019 019 047 047
    005 005 221 019 019 054 054
    005 005 222 019 019 068 069
    005 005 223 019 019 105 108
    005 005 224 019 019 114 115
    005 005 225 019 019 117 118
    005 005 226 020 024 169 172
    005 005 227 020 024 178 178
    005 005 228 199 199
    005 005 229 024 024 176 176
    005 005 230 179 179
    005 005 231 025 026 005 005
    005 005 232 025 026 057 057
    005 005 233 025 026 068 069
    005 005 234 025 026 105 108
    005 005 235 025 026 114 115
    005 005 236 025 026 117 118
    005 005 237 128 128
    005 005 238 025 029 035 035
    005 005 254 025 029 042 043
    005 005 267 025 029 048 048
    010 011 130 025 029 054 054
    010 011 131 025 029 056 056
    010 011 132 025 029 058 059
    010 011 136 025 029 109 109
    010 012 042 026 026 120 126
    010 012 045 027 029 170 174
    010 012 129 027 029 177 177
    010 012 206 199 199
    010 012 207 027 034 169 169
    010 012 208 027 034 175 176
    010 012 214 178 178
    010 012 216 030 033 005 005
    010 012 217 030 033 047 047
    010 012 218 030 033 105 105
    010 013 043 030 033 107 109
    010 013 140 030 033 114 115
    010 013 141 030 033 117 118
    010 013 142 177 177
    010 013 166 033 033 119 119
    010 013 167 127 127
    010 013 168 034 034 044 044
    010 013 173 034 034 048 049
    010 013 174 034 034 080 084
    010 013 210 034 034 168 168
    010 013 211 034 034 170 174
    010 013 212 034 034 189 199
    010 013 213 219 219
    010 016 144 035 035 029 029
    010 016 145 035 035 060 069
    010 016 146 035 035 106 106
    010 016 177 035 035 109 109
    010 018 169 035 035 124 127
    010 024 148 133 133
    010 024 149 035 043 005 005
    011 011 085 035 043 105 105
    011 011 086 035 043 107 108
    011 011 182 035 043 114 115
    011 011 184 117 117
    011 011 185 036 036 084 084
    011 011 186 036 036 170 172
    011 011 187 036 036 197 198
    012 012 040 219 219
    012 012 041 036 037 044 044
    012 012 143 036 037 080 083
    012 012 147 036 037 169 169
    012 012 158 036 037 175 179
    012 012 159 036 037 190 192

    Please Login or Register  to view this content.
    Last edited by vlock22; 05-01-2015 at 01:56 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    04-12-2012
    Location
    India
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, 2019, Office 365, Google Spreadhsheet
    Posts
    640

    Re: Evaluate columns for sequential numbers and roll up

    Hi Vlock,

    Welcome to the forum Unfortunately, Your post does not comply with Rule 3 of our Forum RULES.

    3. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the [#] button at the top of the post window (if you are editing an existing post, press Go Advanced to see the [#] button). The result will appear like this in the post window:

    ['code]
    your code here ...
    and here ...
    and here
    ['/code]


    ... and appear like this when posted:

    Please Login or Register  to view this content.


    *Remove " ' " sign after [
    Cheers!!!

    Anil Dhawan
    Last edited by adhawan06; 05-01-2015 at 01:55 PM.
    Thanks,
    Anil Dhawan


    Click *Add Reputation to say "Thanks" and don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved) if you are satisfied.

    Don't stop when you are tired. STOP when you are done!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Evaluate to columns; compare two columns and return result
    By kjxavier in forum Excel General
    Replies: 2
    Last Post: 09-25-2014, 04:08 AM
  2. [SOLVED] copy sequential columns / paste to non-sequential columns
    By macrorookie in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-09-2014, 04:59 PM
  3. [SOLVED] Bug: Evaluate function with numbers is erratic
    By Paulo Buchsbaum in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-24-2012, 08:19 PM
  4. Evaluate digits within numbers
    By rcane in forum Excel General
    Replies: 11
    Last Post: 11-18-2009, 10:57 PM
  5. Can Excel evaluate a series of numbers
    By Chad Sellers in forum Excel General
    Replies: 6
    Last Post: 11-11-2005, 06:50 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1