VBA code for import/export cell values from one sheet to another
#1
Good day everyone,

I am trying to use VBA to take specific cell values from 2 sheets to a single sheet EXPORT. And also add texts in cells of EXPORT sheet, where required (reference sheet available in attached file namely "Scheduler1"). A better picture is provided in the attached file, where I tried to integrate information via text boxes, hopefully in a clear way. Your guidance and help is appreciated.
 
DESCRIPTION:
 
Let me first say, Scheduler1 sheet is what the final EXPORT sheet will look like and it is just provided as a 'reference sheet' i.e., you don't need data from Scheduler1 sheet.

Regarding the MSx-OUT sheet, it is a combination of two sheets (INT-OUT, BOOL-OUT), and they will be in the main file as hidden sheets. The main reason for making this extra sheet was to put all the required data from these 2 sheets to a single sheet. If required for the macro, I can share these 2 sheets too. The cell column on MSx-OUT sheet is just the reference of the starting cell (not needed for macro in my opinion), e.g, A27, from which, the entire row (from either BOOL-OUT or INT-OUT sheets) is copied and pasted in the MSx-OUT sheet. You can see in the sheet, the columns are E,F,...,W. So, basically entire row is copied and not just cell A27. However, only the blue highlighted cells are important.
 
So, the column C in MSx-OUT sheet namely 'sheet' (having entries BOOL-OUT/INT-OUT) can be directly imported in EXPORT sheet under column E namely 'BOOL/INT-OUT' for relevant entries via the macro. Therefore, you only can quote MSx-OUT sheet in macro.
 
I hope this makes it clear.  17

Thank you! 
Regards,
FNa


Angehängte Dateien
.xlsm   20240716_sync_tool_final_draft_FNa.xlsm (Größe: 42,78 KB / Downloads: 4)
Antworten Top
#2
Die Übersetzung in Deutsch:

Guten Tag zusammen,

Ich versuche, VBA zu verwenden, um bestimmte Zellwerte aus 2 Blättern in ein einziges Blatt EXPORT zu übernehmen. Und auch Texte in den Zellen des EXPORT-Blattes hinzufügen, wo erforderlich (Referenzblatt in der angehängten Datei verfügbar, nämlich „Scheduler1“). Ein besseres Bild bietet die beigefügte Datei, in der ich versucht habe, Informationen über Textfelder zu integrieren, hoffentlich auf eine klare Art und Weise. Ich bin Ihnen für Ihre Hilfe und Unterstützung dankbar.

BESCHREIBUNG:

Zunächst möchte ich sagen, dass das Blatt Scheduler1 so aussieht, wie das endgültige EXPORT-Blatt aussehen wird, und dass es nur als „Referenzblatt“ zur Verfügung gestellt wird, d. h. Sie benötigen die Daten aus dem Blatt Scheduler1 nicht.

Das Blatt MSx-OUT ist eine Kombination aus zwei Blättern (INT-OUT, BOOL-OUT), die sich in der Hauptdatei als versteckte Blätter befinden. Der Hauptgrund für die Erstellung dieses zusätzlichen Blattes bestand darin, alle erforderlichen Daten aus diesen beiden Blättern in einem einzigen Blatt zusammenzufassen. Wenn es für das Makro erforderlich ist, kann ich diese 2 Blätter auch gemeinsam nutzen. Die Zellenspalte auf dem Blatt MSx-OUT ist nur die Referenz der Startzelle (für das Makro meiner Meinung nach nicht erforderlich), z. B. A27, von der die gesamte Zeile (entweder aus den Blättern BOOL-OUT oder INT-OUT) kopiert und in das Blatt MSx-OUT eingefügt wird. Wie Sie sehen können, lauten die Spalten in der Tabelle E, F,..., W. Es wird also im Grunde die gesamte Zeile kopiert und nicht nur die Zelle A27. Allerdings sind nur die blau markierten Zellen wichtig.

So kann die Spalte C im MSx-OUT-Blatt, nämlich 'Blatt' (mit den Einträgen BOOL-OUT/INT-OUT), direkt in das EXPORT-Blatt unter Spalte E, nämlich 'BOOL/INT-OUT', für die entsprechenden Einträge über das Makro importiert werden. Daher können Sie im Makro nur das Blatt MSx-OUT zitieren.

Ich hoffe, das macht es klar.  17

Herzlichen Dank!
Mit freundlichen Grüßen,
FNa

Übersetzt mit DeepL.com (kostenlose Version)

Aber was ist nun die Frage an das Forum? Ich habe keine plausible gefunden!
[Bild: attachment-190.gif]
Gruß Günter
aus der Helden-, Messe-, Musik-, Buch-, Universitäts- und Autostadt Leipzig
Antworten Top
#3
Hello,

1)
it's not necessary to upload a xlsm - file for your question. There is only a simply code to save sheets inside. Some user don't download files with macros ...

2)
It looks like that datas from sheet "input" are copied and transposed to example sheet "schedule1", column "Ctrl-TargetValue", grouped by description / stepname and considered by diffferent duration for one description, p.e. UI reference one time with 0,5 and only one time with 60 s.
--> What did you mean with "so on ...!" when the other items are to ignore?

3)
From where are Datas für "initialise" and "end"?

4)
Datas with "EIS" in description are to ignore every time?
Second Reference conditions too?
--> Is it possible that there are more datas?
--> Are all datas to ignore after first block of "UI reference"?

The file here in this post is only your file as xlsx - may be, that other users look in it to solve the problem too.


.xlsx   20240716_sync_tool_final_draft_FNa.xlsx (Größe: 38,2 KB / Downloads: 0)
.      \\\|///      Hoffe, geholfen zu haben.
       ( ô ô )      Grüße, André aus G in T  
  ooO-(_)-Ooo    (Excel 97-2019+365)
Antworten Top


Gehe zu:


Benutzer, die gerade dieses Thema anschauen: 2 Gast/Gäste