excel - Fill New Sheets With Data From Other Sheets -


I have a master sheet in which the home address is the row of data, one of which is a "State" column. I have 50 other sheets in the same document, according to each 50 United States. What do I want to do: When I enter an address in the master sheet and enter a state ("ca" or "california"), then I want to automatically populate the "ca" sheet at that address I am Thanks!

Many assumptions here:

1) The area of ​​the state is final to fill , So that you can enter the state, you can immediately copy the address to the correct worksheet.

2) You summarize your states and workships with your names that exactly match the state cipher.

3) Data from the state's worksheets is closest and starts with A1.

  Private workshitshoes (Volt target as range) const lngSTATECOLUMN as long as = 6 dim wks as long as the worksheet dim lngNextAvailableRow 'check that only one cell Being changed 'if Target.Areas.Count = 1 and Target. Cell. Calculate = 1 'then check that the cell is being edited' if the state is in the column 'is not the goal (target, column (lngSTATECOLUMN)) nothing' check that a two-letter entry state column 'if lane (target .view) = 2 then 'Stop error checking, if it can not find a matching worksheet' resume error on next set wks = Go toTo 0 'con tinyue on thisWorkbook.Worksheets (Target.Value) error He found a worksheet with the same name that you input Rte If 'If not, then Elanjianiafaplbdharevl = wks.Range ( "a1"). CurrentRegion.Rows.Count + 1 ActiveSheet.Range (cell (target rau, 1), cells (target row, 6)). Copy wks.Range ("A" & LngNextAvailableRow) if End & End End End End End  

I ask that you duplicate your data in 50 different worksheets Why do you need to? It is highly incompetent and suffers from errors. I will advise against very strongly unless you have to do this for a particular reason.

If you need to display or use different state addresses at some points, then I see instead of filtering the main list of addresses


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -