Write code in vba to determine the row number

Assignment Help Visual Basic Programming
Reference no: EM13843689

 

1)

A. How do you access the VBA window?

B. Write code in VBA to determine the row number of the last row with data. Are there any precautions/edge cases to be aware of for that code?

C. Please see EXCEL Attached file with two sheets:

1. "Base", which has data from 7/13-7/26

2. "Addition", which has data from 7/20-8/02.

Write a function in VBA to refresh the data in "Base" with that in "Addition". In other words:

1. Remove records in "Base" if they fall within the date range of records in "Addition"

2. Append the records from "Addition" to "Base". Do not include the Grand Total row

when appending

2)

SQL Case Study:

This is one of the worst query written according to a production support personnel. Why do you think that is the case? And how can you improve? Give 2-3 areas that can be improved.

SELECT
t.*
FROM
(
SELECT
sub.*
FROM
(
SELECT
log_inner.*
FROM
(
SELECT
-- log_visit.*, log_action.name
-- log_visit.*, log_link_visit_action.server_time, log_action.name
log_visit.idvisit,
log_visit.idsite,
CONV(HEX(log_visit.idvisitor), 16, 10) AS idvisitor,
visitor_localtime,
visitor_returning,
visitor_count_visits,
visitor_days_since_last,
visitor_days_since_order,
visitor_days_since_first,
visit_first_action_time,
visit_last_action_time,
visit_exit_idaction_url,
visit_exit_idaction_name,
visit_entry_idaction_url,
visit_entry_idaction_name,
visit_total_actions,
visit_total_searches,
visit_total_events,
visit_total_time,
visit_goal_converted,
visit_goal_buyer,
referer_type,
referer_name,
referer_url,
referer_keyword,
config_id,
config_os,
config_os_version,
config_browser_name,
config_browser_version,
config_device_type,
config_device_brand,
config_device_model,
config_resolution,
config_pdf,
config_flash,
config_java,
config_director,
config_quicktime,
config_realplayer,
config_windowsmedia,
config_gears,
config_silverlight,
config_cookie,
inet_ntoa(CONV(HEX(location_ip), 16, 10)) AS location_ip,
location_browser_lang,
location_country,
location_region,
location_city,
location_latitude,
location_longitude,
log_visit.custom_var_k1,
log_visit.custom_var_v1,
log_visit.custom_var_k2,
log_visit.custom_var_v2,
log_visit.custom_var_k3,
log_visit.custom_var_v3,
log_visit.custom_var_k4,
log_visit.custom_var_v4,
log_visit.custom_var_k5,
log_visit.custom_var_v5,
location_provider,
log_link_visit_action.server_time,
log_action. NAME
FROM
piwik_log_visit AS log_visit
LEFT JOIN piwik_log_link_visit_action AS log_link_visit_action ON log_link_visit_action.idvisit = log_visit.idvisit
LEFT JOIN piwik_log_action AS log_action ON log_action.idaction = log_link_visit_action.idaction_url
WHERE
(
log_visit.idsite IN ('8')
AND log_visit.visit_last_action_time>= '2014-10-31 00:00:00'
AND log_visit.visit_last_action_time<= '2014-10-31 23:59:59'
)
AND (
(
log_link_visit_action.idaction_url IN (
SELECT
idaction
FROM
piwik_log_action
WHERE
(
NAME LIKE CONCAT('%', 'success', '%') -- non indexed string comparison against the entire 91million row log_action table
AND type = 1
)
)
)
)
GROUP BY
log_visit.idvisit
) AS log_inner
ORDER BY
idsite,
visit_last_action_time DESC
) AS sub
GROUP BY
sub.idvisit
ORDER BY
sub.visit_last_action_time DESC
) AS t
WHERE
t. NAME = 'burialplanning.com/free-planning-kit-success/'
OR t. NAME = 'burialplanning.com/free-planning-kit-success-no-match/'
OR t. NAME = 'burialplanning.com/free-planning-kit-home-success/'
OR t. NAME = 'burialplanning.com/request-consultation-success/'
OR t. NAME REGEXP '^burialplanning.com/cemeteries/.+/successind/

OR t. NAME REGEXP '^burialplanning.com/cemeteries/.+/cemetery-post-planning-success/

OR t. NAME REGEXP '^burialplanning.com/cemeteries/.+/success-region/

Reference no: EM13843689

Questions Cloud

Consider dell whish is famouse : for its low inventory of parts (from Dell's suppliers) andfinished products (assembled at Dell's manufacturing facilities). If Dellmaintains low inventory of parts, and if Dell wants the suppliers to ship theparts soon after it places an order for th..
Why are paid-in-capital and retained earnings : Why are paid-in-capital and retained earnings
Cumulative effects: : Merle Company has operated for several years and always shows two years of financial statements for users to make better conclusions about trends.  In Year 20, the firm changed one of its accounting methods.  The change was from a GAAP method to a..
Onsider an electric part with two components in series : 2. Consider an electric part with two components in series (component A and componentB). Component A has a reliability of 88%, while component B has a reliability of 94%. Itis known that if the part fails, it will cost the company $1000.a)  What is t..
Write code in vba to determine the row number : Write code in VBA to determine the row number of the last row with data. Are there any precautions/edge cases to be aware of for that code
Contrast differences in accounting processes and procedure : contrast the differences in accounting processes and procedures
Write a prolog program to solve the water jugs problem : Write a Prolog program to solve the water jugs problem: There are two jugs, one holding 3 and the other 5 litres of water. A number of things can be done with the jugs: they can be filled, emptied, and dumped one into the other either until the pou..
Suppose that daily demand for bagels at the local coffee : Suppose that daily demand for bagels at the local coffee shop where you work is found to be Normally distributed with a mean of 250 and a standard deviation of 75 units
Financial analysis measures : Bring together various financial analysis measures and interpret their meaning in order to draw conclusions about various companies. Note that each situation provided is to be considered independently of the others.

Reviews

Write a Review

Visual Basic Programming Questions & Answers

  Designing vb applications across multiple platforms

Technical Project "Designing VB Applications Across Multiple Platforms". This assignment will contain two (2) Parts: Written Paper and Visual Basic Prototype. The Visual Basic Prototype is not included in the total page count but is included in the e..

  Visual basic programming discussion

The use of decision logic is one of the major concepts of computer programming. The decision takes your code from being sequential to one that can take various options based on the different conditions. Determine the method of coding that you would u..

  Ticketseller

Use Visual basic 2010Visual Basic,  TicketSeller. This assignment will contain two (2) Parts: Event Planning Document and Coding phase. You must submit both parts as separate files for the completion of this assignment. Remember, you are only to de..

  Data storage & "exception error trapping"

Discussion on Data Storage and  "Exception Error Trapping".

  Designing vb applications across multiple platforms

Technical Project "Designing VB Applications Across Multiple Platforms".

  The implementation of server side of the application

Implementation of dynamic content, server side (backend) and database for your web site using Microsoft Visual Studio 2012

  Need help building a vwd website

Need help building a VWD website. This website may not go live. I have little progress as a family tragedy has impeded my time for school.

  To develop a visual basic console application

The aim of the assessment is to develop a Visual Basic console application that performs a number of mathematical functions. The mathematics package will be menu driven, i.e. a number of options will be displayed, and the user will be able to input w..

  Program in basic which prompts user to input two integers

Write down the program by using Small Basic which prompts the user to input two integers: firstNum and secondNum (firstNum must be less than secondNum).

  Develop vb-net application that includes arrays and loops

Develop a VB.NET application that includes arrays, loops, and IF statements to do the following. Your output must also display the number of applicant(s) being interviewed.

  Visual basic program to accept numeral values

Write a VISUAL BASIC program to accept numeral values of any unit, sum up the total, calculate the average, and then Output the result with a proper unit.

  Write a visual logic program to accept series of number

Write a Visual Logic program which accepts a series of numbers, until the first negative value is entered. The maximum number of non-negative input values is 250.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd