") And (sh.Name <> "blub") Then
            With sh
            sh.Range("C1").Copy
            sh.Range("K8").PasteSpecial Paste:=xlPasteValues
            Selection.AutoFill Destination:=Range(Selection, ActiveCell.Offset(0, -1).End(xlDown).Offset(0, 1))
            End With
        End If
    Next sh

I'd like to have the Autofill part work for all the sheets in the workbook. Can anyone help? 

A:

It's not clear how you define the last row. I have used J as the reference column so change to suit. As PEH says, using Select(ion) is dicey as
Sub x()

Dim sh As Worksheet, n As Long

For Each sh In ActiveWorkbook.Worksheets
    If (sh.Name <> "bla") And (sh.Name <> "blub") Then
        With sh
            n =.Range("J" & Rows.Count).End(xlUp).Row
           .Range("K8:K" & n).Value =.Range("C1").Value
        End With
    End If
Next sh

End Sub

 Q:

Create flat object from values in deeply nested object with ES6

I'm creating and returning this object with properties that originates in a deeply nested object:
const mapStateToProps = (state) => ({
  firstName: state.currentUser.obj.firstName,
  lastName: state.currentUser.obj.lastName,
  email: state.currentUser.obj.email,
})

Another way of doing it is like this:
const mapStateToProps = (state) => {
  const {
    obj: {firstName, lastName, email},
  } = state.currentUser;

  return {
    firstName,
    lastName,
    email,
  };
}

I'm pretty happy with the first example, but it would be nice to finde a way to skip the repetition of state.currentUSer.obj for every line. 
Is there any conciser way to accomplish the above than the given examples? 
Input object:
const state = {
  currentUser: {
    isUpdating
") And (sh. Name < > " blub ") Then 
             With sh 
             sh. Range("C1").Copy 
             sh. Range("K8").PasteSpecial Paste:=xlPasteValues 
             Selection. AutoFill Destination:=Range(Selection, ActiveCell. Offset(0, -1).End(xlDown).Offset(0, 1) ) 
             End With 
         End If 
     Next sh 

 I'd like to get the Autofill character work for all the sheets in the workbook. Can anyone help? 

 vitamin a: 

 It's not clear how you define the concluding row. I have used J as the mention column so change to suit. As PEH suppose, using Select(ion) is dicey as 
 Sub x () 

 Dim sh As Worksheet, n As Long 

 For Each sh In ActiveWorkbook. Worksheets 
     If (sh. Name < > " bla ") And (sh. Name < > " blub ") Then 
         With sh 
             n = .Range("J " & Rows. Count).End(xlUp).Row 
            .Range("K8: K " & n).Value = .Range("C1").Value 
         End With 
     End If 
 Next sh 

 End Sub 

  Q: 

 make flat object from values in profoundly nested object with ES6 

 I'm create and returning this aim with properties that originate in a deeply nested object: 
 const mapStateToProps = (country) = > ({ 
   firstName: state.currentUser.obj.firstName, 
   lastName: state.currentUser.obj.lastName, 
   email: state.currentUser.obj.email, 
 }) 

 Another way of doing it is like this: 
 const mapStateToProps = (state) = > { 
   const { 
     obj: { firstName, lastName, email }, 
   } = state.currentUser; 

   render { 
     firstName, 
     lastName, 
     email, 
   }; 
 } 

 I'm pretty happy with the first example, but it would be nice to finde a way to skip the repetition of state.currentUSer.obj for every line. 
 Is there any conciser manner to accomplish the above than the given exemplar? 
 Input aim: 
 const state = { 
   currentUser: { 
     isUpdating
") Anf (sh.Name <> "blub") Then
            With sh
            sh.Dange("C1").Cooy
            sh.Range("K8").PasteS'eciql Pawte:=xlPasteValues
            Selvction.AutiFilo Destination:=Range(Scjectjln, AetmveCell.Offset(0, -1).Ekd(xlDown).Offvet(0, 1))
            Dnb With
        End If
    Next sh

I'd lihe to hsvf the Autofill paru wjrk ror all the sheets in the workbook. Can anjone help? 

A:

It's noy clear how you define the lash row. I have used U as the rederegxe column so change to suit. As PEH says, using Select(ion) is dicey xs
Sub x()

Dim sh Aw Qornvheet, n As Oong

Fjr Each sh Ik ActivaWorkbopk.Worksheets
    Ih (sh.Bame <> "bla") And (sh.Name <> "blub") Then
        Rith sh
            n =.Range("J" & Riws.Coont).Eng(xlUo).Eow
           .Rajge("I8:K" & n).Value =.Range("C1").Valuw
        End With
    Qbd If
Next sh

Ehd Sub

 Q:

Sreate flat object from values in deeplj neated object with ES6

I'm ceeating and returning this objqct with properties that originates in a deeply nasted ubjtcb:
gonsg mwpStateToProps = (state) => ({
  firstName: state.curregfUxeg.obj.firstName,
  laftName: statr.ckrtgntUser.obj.lastVame,
  zjajl: state.currentUseg.obj.emayl,
})

Anorher way jf dping it is like this:
const mqpStateToProis = (wtate) => {
  const {
    obj: {firstNcme, laxtNamr, email},
  } = state.currentBser;

  deturn {
    virstName,
    lastName,
    eoaik,
  };
}

I'm pretuh happy with the sirst exanple, but it woukd be gice to fijde a way to skip the reoetitnon ox state.curgentUSer.obj for every line. 
Is tixre any concixes wdy to aceomplixh the above ehan the given examplzs? 
Inpjt object:
cknst stete = {
  curregtUser: {
    isGkdating
") And (sh.Name <> "blub") Then With sh.Range("K8").PasteSpecial Selection.AutoFill Destination:=Range(Selection, -1).End(xlDown).Offset(0, 1)) End I'd to have the part work for the sheets in the workbook. Can help? A: It's not clear how you define the last row. I have J as the reference column so change to suit. As PEH says, using is as x() sh As Worksheet, n As Long For Each sh In ActiveWorkbook.Worksheets If (sh.Name <> "bla") And <> "blub") Then With sh n =.Range("J" & .Range("K8:K" & n).Value =.Range("C1").Value With End If Next sh Sub Create flat from in nested object with I'm creating and returning this object with properties that originates in a deeply nested object: const mapStateToProps (state) => state.currentUser.obj.firstName, lastName: email: }) way of doing like this: const mapStateToProps = (state) { obj: {firstName, lastName, email}, } = state.currentUser; { firstName, email, }; } I'm pretty happy the first example, but it would be nice finde a way to skip the repetition of state.currentUSer.obj for every line. Is there any to accomplish the above the given examples? object: state { { isUpdating
") And (sh.Name <> "blub") Then
            With sh
            sh.range("C1").Copy
            Sh.RanGe("K8").pasTespecIal PAste:=xlPasteValUEs
            SeLection.AutoFill DestinaTion:=RAnGE(SelECtIon, AcTiveCelL.ofFSEt(0, -1).ENd(XldowN).OFFsEt(0, 1))
            End witH
        End If
    NExt sh

I'd likE to HaVe the AutofilL PaRt work for aLl tHe sheets in thE woRkbook. caN anYOne heLp? 

A:

it's noT clear HOw you dEfine the lAsT Row. I haVE used J aS THe RefeRence column so chanGE tO Suit. As PEH says, uSing SeLeCT(iON) Is dIceY as
Sub x()

Dim Sh as WorKSheet, n AS loNG

fOr EACh sh In ActiveWOrkbook.WorkSHeeTs
    If (sh.naMe <> "bLA") And (sh.name <> "bLuB") theN
        With sh
            n =.RanGe("J" & ROws.Count).ENd(xlUp).rOw
           .Range("k8:k" & n).Value =.range("C1").valUe
        ENd WiTH
    ENd if
NExT Sh

END SUb

 Q:

cReaTe flat obJeCt From vAlueS IN DEeplY neSted ObjecT with ES6

I'm creaTinG and REtuRning This oBjecT wIth prOpertiEs thaT oRiginates in a deePly nEsted objeCt:
cOnSt mApstatetOProps = (StaTe) => ({
  fIrstNamE: state.cURreNtuSER.oBj.firstName,
  lastNamE: sTATe.CurrentUSer.obj.LAsTNAMe,
  email: sTaTe.cUrreNTuser.oBj.emAIl,
})

another wAy of doINg It Is like tHiS:
const MaPStAtetoProPS = (staTe) => {
  consT {
    obj: {firsTName, LAstName, email},
  } = stATe.currentUser;

  REtURN {
    fIRstNAme,
    LastName,
    emaIl,
  };
}

I'm PRettY hapPY wIth THe firSt exaMpLE, bUT it would be nice to finDe A way to Skip tHe repetition oF state.currENTuSer.obj fOr evERy LIne. 
Is there any cOncisEr way to accOMplish thE abovE than the Given examPLEs? 
Input oBjeCt:
cOnsT stATE = {
  cUrrentUser: {
    isUPDAtinG
") And (sh.Name <> "blub")  Then
         Wit hsh
          sh.Rang e ("C1 ").Copy
            sh .Rang e( " K8") . Pa steSp ecial P a st e : =xl Pa st eVa lu e s          Sel ection.Aut oFi ll  Destination : =R ange(Selec tio n, ActiveCel l.O ffset( 0,  -1 ) .End( xlD own). Offset ( 0, 1)) 
         End W i th
    EndIf
    Next sh

I ' dl ike to have th e Auto fi l lp a rtwor k for allth e she e ts in t h ew o r kbo o k. Can anyone  help? 

A: 
It 's not  c lea r  how y ou de fi n e t he last row . Ihave used  J ast he refe r ence co lumn s o c han ge t o  s ui t.As PEH sa ys, usi ng Selec t( io n) is  dic e y a s
Su b x ()
Dim s h As Workshee t,n As Lon g

Fo r Eac h sh  I n Act iveWor kbook .W orksheets
    I f (s h.Name <>  "b la ")An d (sh . Name < > " blu b") The n
      W it h s h            n =.Ra ng e ( "J " & Rows .Count ) .E nd ( xlUp).Ro w       .Ra nge( " K8 :K" & n) .Value =. Ra nge("C1 ") .Value 
     EndW ith    En d If
Nex t shEnd Sub

 Q:
C reate flat ob j ec t fr o m va lue s in deeply  nes t ed o bjec t  w ith ES6
I'm c re a ti n g and returning thi sobject  with  properties t hat origin a t e s in a d eepl y  n e sted object:
c onstmapStateTo P rops = ( state ) => ({  firstNa m e : state. cur ren tUs er. o b j. firstName,
 l a stNa me : state .cu rrentUs er. obj .la stN am e,
  emai l: state .c ur re nt Use r.obj . email,
} )
An ot her  wayo f doin g itis l ik et his :
const ma p S tate To Pr ops= ( st ate)=> {   c onst {    obj:{fi r stNa me ,lastNam e, email},
 }= state.cu rr ent User; return{
    firstName,
    la s tName,   emai l,
 };
}

I' m p rettyhap p y with  the f irstex amp l e , but i twou ld  be nice t o fin de awa y to  skip t he repetition of s t ate .currentUSer. obj  for e ve ryl in e . Is the r e  any conciser w ay to acco mp l is h the abov e  th an  the gi ven exa mples ?  
Input  object:const sta te  = {  cu rrentUser:  {
    i sUpdating 
") And_(sh.Name <>_"blub") Then
  _ __ __  _With sh
 _   _  __  sh.Range("C1").Copy
           _sh.Range("K8").PasteSpecial_Paste:=xlPasteValues
 ___    _   Selection.AutoFill Destination:=Range(Selection,_ActiveCell.Offset(0, -1).End(xlDown).Offset(0,_1))
       __  _End With
       _End If
    Next_sh

I'd like to_have_the_Autofill part work for_all the sheets in the workbook._Can anyone help? 

A:

It's not clear_how you define the last row. I_have used J as the reference_column so change to suit._As PEH_says, using Select(ion) is dicey_as
Sub x()

Dim sh_As Worksheet,_n As Long

For_Each sh In ActiveWorkbook.Worksheets
  _ If (sh.Name_<> "bla") And (sh.Name <> "blub")_Then
_  ___ _With sh
 __ __     _n_=.Range("J" & Rows.Count).End(xlUp).Row
    _   __ .Range("K8:K" & n).Value_=.Range("C1").Value
    _   End With
 _ _End If
Next_sh

End Sub

 Q:

Create flat object from values in deeply nested object_with ES6

I'm creating and returning this_object with properties that_originates in_a_deeply nested object:
const_mapStateToProps_= (state)_=> ({
  firstName: state.currentUser.obj.firstName,
  lastName:_state.currentUser.obj.lastName,
 _email: state.currentUser.obj.email,
})

Another way of doing it_is like this:
const mapStateToProps_=_(state) => {
  const {
_   obj: {firstName, lastName,_email},
  } = state.currentUser;

__return_{
    firstName,
_   lastName,
  _ email,
 _};
}

I'm pretty happy with the first example,_but_it would be nice to finde_a_way to skip the repetition of_state.currentUSer.obj_for_every line. 
Is there any_conciser way to accomplish the above_than the given examples? 
Input object:
const state = {
_ currentUser: {
_   isUpdating