VBA Übersetzung von bestimmten Zeilen und Spalten

moritz210

New Member
Joined
Apr 15, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hallo liebes Forum,
ich bin absolute VBA Anfängerin und benötige bitte ihre Hilfe!
Ich habe mithilfe von VBA eine Funktion für die Übersetzung von Zellen erstellt, welche auch funktioniert. Ich brauche die Übersetzung allerdings für bestimmte Zeilen und Spalten (welche varrieren). Ist es möglich anzugeben wann der Start einer Zeile / Spalte ist und wann ihr Ende? Ich bin über jede Hilfe sehr dankbar.
Unten sehen sie meine erstellte Funktion:
Option Explizit
Funktion Translate $ (sText $, FromLanguage $, ToLanguage $)
Dim p1 &, p2 &, url $, resp $
Const DIV_RESULT $ = "<div class =" "Ergebniscontainer" ">"
Const URL_TEMPLATE $ = "https://translate.google.com/m?hl=[from‹&sl=[from‹&tl=[to‹&ie=UTF-8&prev=_m&q="
url = URL_TEMPLATE & WorksheetFunction.EncodeURL (sText)
url = Ersetzen (url, "[to]", ToLanguage)
url = Ersetzen (url, "[von]", FromLanguage)
resp = WorksheetFunction.WebService (url)
p1 = InStr (bzw. DIV_RESULT)
Wenn p1 dann
p1 = p1 + Len (DIV_RESULT)
p2 = InStr (p1 bzw. "</ div>")
Übersetzen = Mid $ (bzw. p1, p2 - p1)
End If
Endfunktion
Unterübersetzung ()

End Sub
.

Danke!
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,843
Members
449,051
Latest member
excelquestion515

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top