mole999
Well-known Member
- Joined
- Oct 23, 2004
- Messages
- 10,524
- Office Version
- 2019
- 2016
- 2013
- Platform
- Windows
Not sure if I have seen this solved or asked before
I have a variable set of values with a key (X0001 to Y1600 currently) downloaded from SQL, against each key is a set of values. I have a table that I want to update when a key with value would not have current data
I would have done something like this but this works on rows
So I want to work down X0001 to Y1600 and where in column B I have a value and on another sheet I have an associated blank I want to place the value in the blank
Any ideas that I can work with (I don't even know what would be good search terms (apart from VBA and LOOP)
I have a variable set of values with a key (X0001 to Y1600 currently) downloaded from SQL, against each key is a set of values. I have a table that I want to update when a key with value would not have current data
I would have done something like this but this works on rows
Code:
For n = StartLookup To EndLookup Step 1
' If Range("S" & n) = "A4 A/S" And Range("AG" & n) = "" Then Range("U" & n) = "NORTHERN PERIMETER ROAD": Range("Y" & n) = "TW6 2RR": Range("AG" & n) = "53Q 106": Range("AH" & n) = "507158": Range("AI" & n) = "176822"
' If Range("S" & n) = "A4+" And Range("AG" & n) = "" Then Range("U" & n) = "NORTHERN PERIMETER ROAD": Range("Y" & n) = "TW6": Range("AG" & n) = "53Q 106": Range("AH" & n) = "507158": Range("AI" & n) = "176822"
Next n
So I want to work down X0001 to Y1600 and where in column B I have a value and on another sheet I have an associated blank I want to place the value in the blank
Any ideas that I can work with (I don't even know what would be good search terms (apart from VBA and LOOP)