View Full Version : Autofill Text if Criteria are met
msiyab
10-19-2021, 06:03 PM
Hi,
I would like a solution (preferably a VBA) to an autofill problem.
I have attached a sample report showing the Data and the Result expected.
I would like the name of the Salesman to appear under column A, ONLY when there is data present in column B to F.
3651
Regards,
Siyab
DocAElstein
10-20-2021, 12:18 AM
Hi Siyab,
This sort of requirement I usually do in VBA with some sort of
__Do While
___ ' do things while certain conditions are met.
__Loop
Type coding.
We are basically needing to do things while certain conditions are met.
So…
This is the sort of thing you had:
Row\ColAB
1Sales Analysis Report
2
3Sales EmployeeArea
4
5John Smith
6Las Vegas
7
8Las Vegas total
9
10Texas
11
12Texas total
13
14John Smith total
15
16Donald Trump
17New York
18New York
19
20New York total
If you run this macro here: https://excelfox.com/forum/showthread.php/2345-Appendix-Thread-(-Codes-for-other-Threads-HTML-Tables-etc-)?p=15704&viewfull=1#post15704 on that data, then you should get something like this:
Row\ColAB
1Sales Analysis Report
2
3Sales EmployeeArea
4
5John Smith
6John SmithLas Vegas
7
8Las Vegas total
9
10John SmithTexas
11
12Texas total
13
14John Smith total
15
16Donald Trump
17Donald TrumpNew York
18Donald TrumpNew York
19
20New York total
Alan
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.