Macro with IF function copying and transferring formats

Keyboard macros or custom scripts

Macro with IF function copying and transferring formats

Postby reza53 » Mon Nov 13, 2017 5:00 pm

Hi, I need a Macro in Excel with IF function. Basically the Macro goes through the first row of WS1. IF there is "Charlie" in A1:A3 (merged cells) the Macro will copy the range F2:H6 from WS2 and paste it below "Charlie" in WS1. IF there is "George" in A1:A3 (merged cells) the Macro will copy the range I2:K6 from WS2 and paste it below "George" in WS1. The Macro will then move to the next position A4:A6 (merged cells) and fills the cells below it based on similar information from WS2, and will continue for "Michael", "James" and ...
The copied cells contain hyperlinks, so I need the formats transferred too.
Please help me with that or guide me if a similar answer exists. Thanks
Office 2013, Windows 7
reza53
 
Posts: 1
Joined: Mon Nov 13, 2017 4:18 pm

Re: Macro with IF function copying and transferring formats

Postby FJCC » Mon Nov 13, 2017 5:36 pm

This forum supports OpenOffice, LibreOffice and related software. Your question seems to be about Excel. I suggest you try an Excel forum to get help with your problem.
AOO 3.4 or 4.1 on MS Windows XP ( before 2013-08-03) or Windows 7
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
FJCC
Moderator
 
Posts: 6160
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Macro with IF function copying and transferring formats

Postby Zizi64 » Mon Nov 13, 2017 5:38 pm

Hi, I need a Macro in Excel with IF function.


It is not a MS Excel Forum.

The macro programming feature of the Apache OpenOffice/Libreoffice Calc application and the MS Excel is not same.
The 'StarBasic IDE and the API of the AOO/LO' and the 'MS VBA of the Excel' are basicly different, not compatible.
Tibor Kovacs, Hungary; LO4.4.7, LO5.3.7 on Win7x64Prof.
PortableApps, WinPenPack: LO3.3.0-LO5.4.2 and AOO4.1.3
Please, edit the topic's initial post, and add the word "[Solved]" at the beginning of the subject line - if your problem has been solved.
User avatar
Zizi64
Volunteer
 
Posts: 6065
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary


Return to OpenOffice Basic, Python, BeanShell, JavaScript

Who is online

Users browsing this forum: No registered users and 9 guests