• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member

Direccionar de un rango a una celda especifica|VBA & Macros|Excel Forum|My Online Training Hub

You are here: Home / Direccionar de un rango a una celda especifica|VBA & Macros|Excel Forum|My Online Training Hub

vba course banner

Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumVBA & MacrosDireccionar de un rango a una celda…
sp_PrintTopic sp_TopicIcon
Direccionar de un rango a una celda especifica
Avatar
Orlando Inocente

New Member
Members
Level 0
Forum Posts: 1
Member Since:
March 23, 2023
sp_UserOfflineSmall Offline
1
March 23, 2023 - 1:16 am
sp_Permalink sp_Print

estimados buenas tardes.

estoy intentando sacar reporte de des este archivo de esta manera.
intente jalar de la columna codigo y fijar en celda celda Código, el cual esta resaltado en la siguiente imagen, pero al generar la macro como resultado me jala el código del cuadro o reporte anterior, e intentado hacer una búsqueda de la hoja5 comparando con la hoja6 y y direccionar el dato encontrado en las celdas código de la hoja6, pero no me da ningun resultado tampoco, la macro que esta corriendo es
Sub Separador()
Dim Fila As Long
Dim Final As Long

Hoja6.Activate

Final = nReg(Hoja6, 13, 1) - 2

With Hoja6

For Fila = Final To 12 Step -1

If .Cells(Fila + 1, 15) <> .Cells(Fila, 15) Then

Rows(.Cells(Fila + 1, 1).Row & ":" & .Cells(Fila + 1, 1).Row + 11).Insert

.Cells(Fila + 1 + 1, 1) = "FORMATO 13.1: REGISTRO DE INVENTARIO PERMANENTE VALORIZADO - DETALLE DEL INVENTARIO VALORIZADO"
.Cells(Fila + 1 + 2, 1) = "PERIODO:"
.Cells(Fila + 1 + 2, 2) = ""
.Cells(Fila + 1 + 3, 1) = "RUC:"
.Cells(Fila + 1 + 3, 2) = ""
.Cells(Fila + 1 + 4, 1) = "RAZÓN SOCIAL:"
.Cells(Fila + 1 + 4, 2) = ""
.Cells(Fila + 1 + 5, 1) = "CÓDIGO:"
.Cells(Fila + 1 + 5, 2) = Hoja6.Cells(Fila, 15)
.Cells(Fila + 1 + 6, 1) = "DESCRIPSIÓN:"
.Cells(Fila + 1 + 6, 2) = Hoja6.Cells(Fila, 16)
.Cells(Fila + 1 + 7, 1) = "UNI. DE MEDIDA:"
.Cells(Fila + 1 + 7, 2) = ""
.Cells(Fila + 1 + 8, 1) = "MÉTODO DE EVALUACIÓN:"
.Cells(Fila + 1 + 8, 2) = ""
.Cells(Fila + 1 + 11, 1) = "FECHA DEL DOCUMENTO"
.Cells(Fila + 1 + 11, 2) = "TIPO DE COMPROBANTE"
.Cells(Fila + 1 + 11, 3) = "SERIE"
.Cells(Fila + 1 + 11, 4) = "Nro DE DOCUMENTO"
.Cells(Fila + 1 + 11, 5) = "TIPO DE OPERACIÓN"
.Cells(Fila + 1 + 10, 6) = "ENTRADAS"
.Cells(Fila + 1 + 10, 9) = "SALIDAS"
.Cells(Fila + 1 + 10, 12) = "SALDOS"
.Cells(Fila + 1 + 11, 6) = "CANTIDAD"
.Cells(Fila + 1 + 11, 7) = "COSTO UNITARIO"
.Cells(Fila + 1 + 11, 8) = "COSTO TOTAL"
.Cells(Fila + 1 + 11, 9) = "CANTIDAD"
.Cells(Fila + 1 + 11, 10) = "COSTO UNITARIO"
.Cells(Fila + 1 + 11, 11) = "COSTO TOTAL"
.Cells(Fila + 1 + 11, 12) = "CANTIDAD"
.Cells(Fila + 1 + 11, 13) = "COSTO UNITARIO"
.Cells(Fila + 1 + 11, 14) = "COSTO TOTAL"
.Cells(Fila + 1 + 11, 15) = "CÓDIGO"

End If
Next
End With

End Sub

por favor me podrian ayudar solucionar este caso o darme las pautas para poder corregir si en algun punto generé mal los códigos de programación. muchas gracias por su apoyo

Avatar
Hans Hallebeek
the Netherlands
Member
Members
Level 0
Forum Posts: 121
Member Since:
October 17, 2018
sp_UserOfflineSmall Offline
2
March 23, 2023 - 5:33 pm
sp_Permalink sp_Print

Hola Orlando,

De esta manera no vas a recibir ninguna ayuda, la macro aparte de que es un cáos solo indica lo que quieres hacer pero no da ninguna idea de los datos a procesar.

Te aconsejo añadir una copia con datos fictivos y con la macro y con una explicación un poco más clara.

Estoy seguro que vos entedés lo que estás explicando pero tienes que leerlo como alguien que no sabe de qué se trata para entenderlo también.

Te olvidaste de dimensionar nReg 

Avatar
Hans Hallebeek
the Netherlands
Member
Members
Level 0
Forum Posts: 121
Member Since:
October 17, 2018
sp_UserOfflineSmall Offline
3
March 24, 2023 - 5:59 pm
sp_Permalink sp_Print

Hola, curioso por saber.

Lo solucionasteWink o ya no tienes más interés

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Alain Balken
Guest(s) 11
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 873
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 222
Jessica Stewart: 216
A.Maurizio: 202
Aye Mu: 201
jaryszek: 183
Newest Members:
Melanie Ford
Isaac Felbah
Adele Glover
Hitesh Asrani
Rohan Abraham
Anthony van Riessen
Erlinda Eloriaga
Abisola Ogundele
MARTYN STERRY
Rahim Lakhani
Forum Stats:
Groups: 3
Forums: 24
Topics: 6356
Posts: 27793

 

Member Stats:
Guest Posters: 49
Members: 32324
Moderators: 3
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: MOTH Support, Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook
 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.